Zen API

- Home
- Topics
- Types
- Files

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

  server | kTcpServer object.
  address | A local IP address to which the server should bind, or kIpAddress_Any().
  port | A local port number to which the server should bind, or kIP_PORT_ANY.
  backlog | The maximum number of pending connection requests to enqueue.

Returns
  Operation status.