class listener : ?sock:t -> address -> object .. end
Use new listener ?sock addr to construct an object derived from
Cf_sock_common.T.basic that sports methods for passive listening
for incoming connections at the local address addr. If the ?sock
argument is provided, then the socket is treated as a newly created
socket and used for the listener. Otherwise, a new socket is created.
Raises Unix.Error if an error occurs.
Inherits
method virtual getsockname : address
Use obj#getsockname to obtain the actual local address
associated with the socket. Raises Unix.Error if there is an
error.
method listen : int -> unit
Use obj#listen n to place the socket into listening mode with
a backlog queue depth of n pending connections. Raises
Unix.Error if there is an error.
method accept : t * address
Use obj#accept to accept a new connection from a remote peer.
Returns a new socket and the address of its remote endpoint.
Raises Unix.Error if an error occurs.