Example: lrs_set_receive_optionSockets Functions

Sets a socket receive option.

int lrs_set_receive_option( int option, int value, [char *terminator]);
option A receiving option indicating when to stop receiving. The available options are Mismatch or EndMarker.
value The option value. (see the chart below)
terminator The character(s) marking the end of the block to receive, in the format: "value ". This parameter is only required if StringTerminator was specified for the EndMarker option.

Option Available Values

1. MISMATCH_SIZE (default)



1. EndMarker_None (default) - receive until the end of the buffer.

2. StringTerminator - the terminating string. (TCP socket type only)

3. BinaryStringTerminator - the terminating string. (TCP socket type only)

4. RecordingSize - the size of the buffer that was recorded. (TCP socket type only)

The lrs_set_receive_option function sets a socket receiving option for lrs_receive. The options indicate to finish receiving socket information—either after a mismatch or when it detects a terminating string. Note that this option does not apply to any receive operations handled with lrs_receive_ex. The options set by this function apply to all occurrences of lrs_receive after this function, unless the option is reset by a subsequent call to lrs_set_receive_option.

This function is not recorded during a WinSock session—you manually insert it into your script.

Return Values

Windows Sockets Return Values


You cannot use standard parameterization for any arguments in this function.