Share this page

# lrs_get_last_received_buffer

Example: lrs_get_last_received_buffer | Buffer Functions

Gets the last buffer received and its size.

    int lrs_get_last_received_buffer( char *s_desc, char **data, int *size );

Input |
s_desc | A descriptor identifying a socket.
Output |
data | A pointer to the buffer containing the data.
size | A pointer to the size (in bytes) of the data.

The lrs_get_last_received_buffer function gets the last received buffer on the socket and its size. Note that function returns the length of the binary representation of data. The data buffer is not NULL terminated.

Note that memory is automatically allocated for the buffer, but you must manually free the memory after using this function with lrs_free_buffer.

This function is not recorded during a WinSock session—you manually insert it into your script. In addition, you must declare variables to store the buffer and its size, before calling lrs_get_last_received_buffer. Declare a character pointer for the data parameter, and an integer for the size parameter.

lrs_get_last_received_buffer and lrs_get_last_received_buffer_size should always follow one of the set of "receive" functions which write received data to a winsocket buffer. The "receive" functions are lrs_receive, lrs_receive_ex and lrs_length_receive.

## Return Values

Windows Sockets Return Values

## Parameterization

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

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