ISelectListener.this

Constructor

Creates the server socket -- a streaming socket of the family (aka "domain") specified in address and the protocol according to protocol -- and registers it for incoming connections.

address.sa_family and protocol are passed to socket(2) together with the SOCK_STREAM type, so the socket family defined by address.sa_family is required to support streaming, and protocol needs to be a streaming protocol. Socket families supporting streaming include IPv4/IPv6 and UNIX domain sockets (AF_LOCAL). protocol == 0 makes socket(2) pick the default streaming protocol for address.sa_family. For IPv4/IPv6 the default protocol is TCP. UNIX domain sockets and some other families support only one streaming protocol so for those the default is unambiguous.

class ISelectListener
protected
this
(
sockaddr* address
,,
int backlog = 32
,
int protocol = 0
)

Parameters

address sockaddr*

the socket address and family, must support streaming

socket ISocket

the server socket

backlog int

the maximum length to which the queue of pending connections for sockfd may grow. If a connection request arrives when the queue is full, the client may receive an error with an indication of ECONNREFUSED or, if the underlying protocol supports retransmission, the request may be ignored so that a later reattempt at connection succeeds. (from http://linux.die.net/man/2/listen)

protocol int

the socket protocol, for a streaming socket of the family specified in address, or 0 to use the default protocol for a streaming socket of the specified family

Meta