nlAcceptConnection

accept a pending connection

C Specification

NLsocket nlAcceptConnection(NLsocket socket)

Parameters

socket

[in]Specifies a socket object ready to accept incoming connections.

Description

nlAcceptConnection returns a new socket object if a new connection is accepted. This new socket will only receive packets from the remote address that connected. Incoming connections must have already been enabled with a call to nlListen.

Return values

If no error occurs, nlAcceptConnection returns a socket object for the new connection.

Otherwise, a value of NL_INVALID is returned, and the specific error code can be retrieved by calling nlGetError

Error codes

NL_NOT_LISTEN : nlListen has not been called on this socket.
NL_NO_PENDING : There are no pending connections at this time.
NL_WRONG_TYPE : The function does not support this socket type (NL_BROADCAST or NL_MULTICAST).

See also

nlListen,
nlConnect


Back to the HawkNL index page


Go directly to the main HawkNL page at Hawk Software

© 2000-2002 Phil Frisbie.

Valid XHTML 1.0!