12 #ifndef ROC_NETIO_TCP_SERVER_PORT_H_
13 #define ROC_NETIO_TCP_SERVER_PORT_H_
79 static void poll_cb_(uv_poll_t* handle,
int status,
int events);
80 static void close_cb_(uv_handle_t* handle);
82 virtual void handle_terminate_completed(
IConn& conn,
void* arg);
83 virtual void handle_close_completed(
BasicPort& port,
void* arg);
86 void finish_closing_server_();
88 size_t num_connections_()
const;
89 void async_close_all_connections_();
99 void* close_handler_arg_;
105 uv_poll_t poll_handle_;
106 bool poll_handle_initialized_;
107 bool poll_handle_started_;
IArena & arena() const
Get arena.
Intrusive doubly-linked list.
Shared ownership intrusive pointer.
Connection acceptor interface.
Termination handler interface.
TcpServerPort(const TcpServerConfig &config, IConnAcceptor &conn_acceptor, uv_loop_t &loop, core::IArena &arena)
Initialize.
const address::SocketAddr & bind_address() const
Get bind address.
virtual AsyncOperationStatus async_close(ICloseHandler &handler, void *handler_arg)
Asynchronously close TCP server.
virtual ~TcpServerPort()
Destroy.
virtual bool open()
Open TCP server.
virtual void format_descriptor(core::StringBuilder &b)
Format descriptor.
Connection acceptor interface.
Termination handler interface.
Intrusive doubly-linked list.
int SocketHandle
Platform-specific socket handle.
AsyncOperationStatus
Asynchronous operation status.
Shared ownership intrusive pointer.
Commonly used types and functions.
TCP connection parameters.
address::SocketAddr bind_address
Server will bind to this address. If IP is zero, INADDR_ANY is used, i.e. the socket is bound to all ...
size_t backlog_limit
Maximum length to which the queue of pending connections may grow.