Share this page

# lrs_exclude_socket

Sockets Functions

Excludes all operations for a specific socket.

    int lrs_exclude_socket( char *s_desc );

s_desc | A descriptor identifying a socket.

The lrs_exclude_socket function excludes all operations for the specified socket. All functions within your script that use the specified socket are ignored from the point of the function and onward. It is recommended that you put this function in the vuser_init section of your script. The exclusion applies to socket functions in all sections of the script.

This function is not recorded during a Windows Socket session and only applies to replay.

## Return Values

Windows Sockets Return Values

## Parameterization

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

## Example

In the following example, the lrs_exclude_socket function excludes all operations on socket1. The script performs all operations on the other sockets in the script.

    lrs_exclude_socket("socket1");

    lrs_create_socket("socket0", "UDP", "LocalHost=0", "RemoteHost=localhost:1738", LrsLastArg);

    /* The following section is excluded during replay */

    lrs_create_socket("socket1", "UDP", LrsLastArg);

    lrs_send("socket1", "buf0", "TargetSocket=mustang.abc.co.il:53", LrsLastArg);

    lrs_receive("socket1", "buf1", LrsLastArg);

    lrs_close_socket("socket1");

    /* The script resumes execution from here */

    lrs_create_socket("socket2", "TCP", "LocalHost=0", "RemoteHost=testpc1.abc.co.il:80", LrsLastArg);

    lrs_send("socket0", "buf2", LrsLastArg);

    lrs_receive("socket0", "buf3", LrsLastArg);

    lrs_send("socket2", "buf4", LrsLastArg);

    lrs_receive("socket2", "buf5", LrsLastArg);

    lrs_send("socket2", "buf6", LrsLastArg);

...

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