Windows Sockets Vuser Functions (LRS) > Alphabetical List of Functions > lrs_set_accept_timeout


Example: lrs_set_accept_timeout Timeout Functions

Sets a timeout for accepting a socket.

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

The lrs_set_accept_timeout function sets the amount of time the server waits to detect a readable socket (select), and complete the association (accept). If the socket is currently listening, it will be marked as readable if an incoming connection request was received. Once a socket is marked as readable, an accept is guaranteed to complete without blocking. You can specify seconds and microseconds for the timeout. If a socket was not accepted within the timeout interval, the script execution will terminate. The default timeout is 10 seconds. If you see that the default time is insufficient for you, modify it accordingly.

Note that the timeout value set with this function is used for all sockets until the next call to lrs_set_accept_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.