Example: lrs_set_send_timeout Timeout Functions

Sets a timeout for sending data on a socket.

void lrs_set_send_timeout( long sec, long u_sec );
sec The desired timeout in seconds.
u_sec The desired timeout in microseconds (added to the sec parameter)

The lrs_set_send_timeout function sets a timeout for sending data on a writable socket. You can specify seconds and microseconds for the timeout.

The lrs_send function writes outgoing data to a connected datagram or stream sockets. If it does not succeed in sending all of the data in the buffer, it attempts to do so until the send timeout. If it cannot find a writable socket for the data, the function continues to look for a socket until the send timeout. By default the send_timeout is 10 seconds. You can modify the timeout using lrs_set_send_timeout. Note that the successful completion of a lrs_send does not indicate that the data was successfully delivered.

The send timeout is global for all sockets. It is valid until the next call to lrs_set_send_timeout.

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

Return Values

This function has no return value.


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