Share this page

# Windows Sockets data

When you use VuGen to create a Windows Sockets Vuser script, your actions are recorded into the three sections of the script: vuser_init, Action, and vuser_end. In addition to the Vuser script, VuGen also creates data files:

- snapshotdata.ws contains the data that was transmitted or received during the recording session. VuGen's Snapshot pane displays the contents of the data file. Do not modify the contents of the snapshotdata.ws file.
- data.ws contains the data that is transmitted during the replay sessions, and is expected to be received. You can right-click any step in the Editor and then select Show Arguments to show the buffer content that is stored in data.ws for the selected step. Using the Text View tab of the dialog box that opens, you can edit the data that is stored for any data buffer.

Several LRS functions, such as lrs_receive and lrs_send, handle the actual data that is transferred between servers and clients. The data that is received or transmitted is stored in data buffers, which can be very large. In order to simplify the appearance of the Vuser script, the actual data is stored in external files—not in the C file. When a data transfer occurs, the data is copied from the external file into a temporary buffer.

The external file, data.ws, contains the contents of all the temporary buffers. The buffers' contents are stored as sequential records. The records are marked by identifiers indicating whether the data was sent or received, and the buffer descriptor. The LRS functions use the buffer descriptors to access the data.

The descriptors have one of the following formats:

    recv buf index   number of bytes received
    send buf index   number of bytes sent

The buffer index begins with 0 (zero), and all subsequent buffers are numbered sequentially (1,2,3...) regardless of whether they are send or receive buffers.

In the following example, an lrs_receive function was recorded during a Vuser session:

    lrs_receive("socket1", "buf4", LrsLastArg)

In this example, lrs_receive handled data that was received on socket1. The data was stored in the fifth receive record(buf4)—note that the index number is zero-based. The corresponding section of the data.ws file shows the buffer and its contents.

    recv buf4 39
        "\xff\xfb\x01\xff\xfb\x03\xff\xfd\x01"
        "\r\n"
        "\r\n"
        "SunOS UNIX (sunny)\r\n"
        "\r"
        "\x0"
        "\r\n"
        "\r"
        "\x0"

For task details, see View and modify Windows Sockets buffers.

https://admhelp.microfocus.com VuGen,Professional Performance Engineering,Performance Engineering for Developers 8942
Tips to improve your search results... OpenText™ Virtual User Generator Help Center OpenText™ VuGen Help 26.1-26.3 All View Local Help Center View Online Help Center Version: