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

lrs_send

Example: lrs_send Sockets Functions

Sends data on a datagram or a stream socket.

int lrs_send( char *s_desc, char *buf_desc, [char *target], [char *flags,] LrsLastArg );
s_desc A descriptor identifying a connected socket.
buf_desc

A descriptor identifying a buffer.

For details on editing the Windows Sockets Buffers, see How to View and Modify Windows Sockets Buffers under Windows Sockets Protocol in the VuGen User Guide.

target The IP address of the target host in dotted form or the host name in the following format: "TargetSocket=host:port" (optional)
flags Receive and Send Flags that specify the way in which the call is made (optional). Use the following format:"Flags=flags"
LrsLastArg A marker indicating the end of the parameters (used where optional parameters are available).

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.

If no buffer space is available within the transport system to hold the data, lrs_send blocks the transmission unless the socket has been placed in a non-blocking I/O mode.

This function is recorded during a Windows Socket session.

Return Values

Windows Sockets Return Values

Parameterization

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