Share this page

# 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.

## Parameterization

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

## Example

In the following example, lrs_set_send_timeout specifies a timeout of 90 seconds.

Copy code

    lrs_create_socket("socket2", "TCP", "RemoteHost=tears.abc.co.il:23", LrsLastArg);
    lrs_set_send_timeout(90,0);
    lrs_send("socket2", "buf2", LrsLastArg);

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: