Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages

kStatus kUdpClient_SetReadBuffers | ( | kUdpClient | client,
|  | kSSize | socketSize,
|  | kSSize | clientSize
| ) |  |

Sets the size of read buffers.

Socket buffers decouple the sender and receiver, so that the sender does not need to block while waiting for the receiver to receive all bytes. Client buffers enable the client to read the datagram over multiple read calls, rather than receiving the entire datagram in a single read call.

If the client buffer size is greater than zero, use the kUdpClient_Receive method to receive a datagram before calling kUdpClient_Read. If the client buffer size is zero, a complete datagram can be received (without buffering) using kUdpClient_ReadFrom.

Parameters

  client | UDP client object.
  socketSize | Size of the read buffer maintained by the underlying socket (-1 to leave unchanged).
  clientSize | Size of the read buffer maintained by the client object (-1 to leave unchanged).

Returns
  Operation status.