nlOpen

open (create) a socket

C Specification

NLsocket nlOpen(NLushort port, NLenum type)

Parameters

port

[in]The port to bind to.

type

[in]The type of socket to create (NL_RELIABLE, NL_UNRELIABLE, NL_RELIABLE_PACKETS, NL_BROADCAST, NL_MULTICAST).

Description

nlOpen returns a new socket object of type, bound to port. If port is '0', then the system will assign a port number.

Return values

If no error occurs, nlOpen returns a new socket object.

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

Error codes

NL_INVALID_ENUM : The socket type is not valid.
NL_SYSTEM_ERROR : A system Socket error has ocurred. The system error can be retrieved by calling nlGetSystemError.

See also

nlClose,
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!