lrs_set_connect_timeout

Timeout Functions

Sets a timeout for connecting to a socket.

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

The lrs_set_connect_timeout function sets a timeout for connecting to a socket. You insert this programmable function (not recorded) directly before a connect command, lrs_create_socket.

The connect timeout is global for all sockets. It is valid until the next call to lrs_set_connect_timeout.

Return Values

This function has no return value.

Parameterization

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

Example

In the following example, lrs_set_connect_timeout specifies a connection timeout of 100 seconds.

lrs_set_connect_timeout(100, 0);
lrs_create_socket("socket0", "TCP", "LocalHost=0",     "RemoteHost=ftp.abc.com:23", LrsLastArg);