Zen API | Contents | Reference | Previous | Up | Next

zReceiver_SetBuffers
zReceiver functions
C

    zStatus zReceiver_SetBuffers(zReceiver client, zIntPtr socketSize, zIntPtr receiverSize);

Parameters

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.

Description

Sets the size of read buffers.

Remarks

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.

File

zReceiver.h

Copyright (c) 2008-2010 by LMI Technologies Inc. All rights reserved.
Contents | Reference