Zen API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStatus kTcpServer_Listen ( kTcpServer  server,
kIpAddress  address,
k32u  port,
kSize  backlog 
)

Places the server into the listening state, to monitor for incoming connection requests.

The server can be placed in the listening state only once per kTcpServer object. After the server is shut down, the kTcpServer object cannot be used to listen again on another port.

Parameters
serverkTcpServer object.
addressA local IP address to which the server should bind, or kIpAddress_Any().
portA local port number to which the server should bind, or kIP_PORT_ANY.
backlogThe maximum number of pending connection requests to enqueue.
Returns
Operation status.