|Example: lrs_set_socket_options||Sockets Functions|
Sets a socket option.
int lrs_set_socket_options( char *s_desc, int option, char *option_value );
|s_desc||A descriptor identifying a socket.|
|option||A socket option. Currently, the only available option is LRS_NO_DELAY.|
|option_value||The option value or type. Currently, the available values are TRUE or FALSE. Setting the value to TRUE enables the LRS_NO_DELAY option.|
The lrs_set_socket_options function sets an option for the specified buffer.
Under normal circumstances, TCP sends data when it is presented. If outstanding data has not yet been acknowledged, it gathers small amounts of output and sends it in a single packet once an acknowledgement is received. For several client types, such as window systems that send a stream of mouse events, this gathering of data into packets may cause significant delays.
Therefore, TCP provides a Boolean option, TCP_NODELAY to defeat this algorithm and prevent the delay. The LRS equivalent of this option is LRS_NO_DELAY.
Note: This function may only be used with TCP sockets.
You cannot use standard parameterization for any arguments in this function.