zStatus zReceiver_SetBuffers(zReceiver client, zIntPtr socketSize, zIntPtr receiverSize);
|
Parameters |
Description |
|
zIntPtr socketSize |
Size of the read buffer maintained by the underlying socket (-1 to leave unchanged). |
|
zIntPtr receiverSize |
Size of the read buffer maintained by the receiver object (-1 to leave unchanged). |
|
receiver |
zReceiver object. |
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. Recevier buffers improve the efficiency of the recevier when performing several small read operations (e.g. result messages headers).
If you will be using the zReceiver_Read function with a large buffer argument, consider setting receiverSize to 0. This will bypass zReceiver's internal buffer and copy directly into your buffer.
This function can only be called before a connection is established with zReceiver_Open.
zReceiver.h