Commit a80ca31a authored by Dominik Charousset's avatar Dominik Charousset

Fix formatting

parent 230fa863
......@@ -15,10 +15,10 @@ struct default_handshake_worker_factory {
OnError abort;
};
/// An connect worker calls an asynchronous `connect` callback until it succeeds.
/// On success, the worker calls a factory object to transfer ownership of
/// socket and communication policy to the create the socket manager that takes
/// care of the established connection.
/// An connect worker calls an asynchronous `connect` callback until it
/// succeeds. On success, the worker calls a factory object to transfer
/// ownership of socket and communication policy to the create the socket
/// manager that takes care of the established connection.
template <bool IsServer, class Socket, class Policy, class Factory>
class handshake_worker : public socket_manager {
public:
......@@ -31,7 +31,7 @@ public:
using write_result = typename super::write_result;
handshake_worker(Socket handle, multiplexer* parent, Policy policy,
Factory factory)
Factory factory)
: super(handle, parent),
policy_(std::move(policy)),
factory_(std::move(factory)) {
......
......@@ -460,7 +460,8 @@ private:
/// Stores the current offset in `read_buf_`.
ptrdiff_t offset_ = 0;
/// Stores the offset in `read_buf_` since last calling `upper_layer_.consume`.
/// Stores the offset in `read_buf_` since last calling
/// `upper_layer_.consume`.
ptrdiff_t delta_offset_ = 0;
/// Caches incoming data.
......
......@@ -158,7 +158,7 @@ operation multiplexer::mask_of(const socket_manager_ptr& mgr) {
auto fd = mgr->handle();
if (auto i = updates_.find(fd); i != updates_.end())
return to_operation(mgr, i->second.events);
else if (auto index = index_of(mgr);index!=-1)
else if (auto index = index_of(mgr); index != -1)
return to_operation(mgr, pollset_[index].events);
else
return to_operation(mgr, std::nullopt);
......@@ -281,7 +281,7 @@ bool multiplexer::poll_once(bool blocking) {
// is allowed to modify pollset_ and managers_. Since this may very well
// mess with the for loop below, we process this handler first.
auto mgr = managers_[0];
handle(mgr,pollset_[0].events,revents);
handle(mgr, pollset_[0].events, revents);
--presult;
}
for (size_t i = 1; i < pollset_.size() && presult > 0; ++i) {
......
......@@ -43,7 +43,7 @@ using byte_buffer_ptr = std::shared_ptr<byte_buffer>;
struct fixture : host_fixture {
using byte_buffer_ptr = std::shared_ptr<byte_buffer>;
fixture(){
fixture() {
multiplexer::block_sigpipe();
OPENSSL_init_ssl(OPENSSL_INIT_SSL_DEFAULT, nullptr);
// Make a directory name with 8 random (hex) character suffix.
......@@ -174,7 +174,7 @@ void dummy_tls_server(stream_socket fd, std::string cert_file,
if (f.accept(fd) <= 0) {
std::cerr << "*** accept failed: " << ssl::fetch_error_str();
return;
}
}
// Do some ping-pong messaging.
for (int i = 0; i < 4; ++i) {
byte_buffer buf;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment