sock_handle_t start_accept() { sock_handle_t handle = next_unused_tcp(); if (!socket_handle_valid(handle)) return handle; ip::tcp::socket& sock = tcp_from(handle); acceptor.accept(sock); return handle; }
sock_handle_t accept() { sock_handle_t handle = next_unused_tcp(); if (!socket_handle_valid(handle)) return handle; ip::tcp::socket& sock = tcp_from(handle); acceptor.accept(sock, ec); return !ec ? handle : socket_handle_invalid(); }
void open_socket_wait_for_connect_() { acceptor_.accept( socket_ ); }