|Example: lrs_get_received_buffer||Buffer Functions|
Gets the last received buffer or a part of it.
char *lrs_get_received_buffer( char *s_desc, int offset, int length, char *encoding );
|s_desc||A descriptor identifying a socket.|
|offset||The offset inside a buffer (binary representation of the data).|
|length||The length of the data to retrieve (binary representation). Specify -1 to ignore the offset and retrieve the whole buffer.|
|encoding||The encoding method for the returned data. The possible values are "ascii", "ebcdic", or NULL|
The lrs_get_received_buffer function retrieves the whole buffer or part of it, that was received from the last call to either lrs_receive, lrs_receive_ex or lrs_length_receive. You specify the offset and length of the data to retrieve.
After this function is executed, the retrieved buffer (or part of the buffer) is stored in the internal buffer (User Buffer ) in the format specified by the encoding parameter. The return value is a pointer to the user buffer. If the encoding parameter is set to NULL, the user buffer is stored in the original client encoding (either ebcdic or ascii).
To retrieve the contents of the user buffer, use lrs_get_user_buffer . To determine its size, use lrs_get_user_buffer_size.
Note that the following functions overwrite the same internal buffer (user buffer):
In all of the above user buffer functions (except lrs_decimal_to_hex_string), use lrs_get_user_buffer_size to determine the actual buffer size before printing the buffer contents. Do not retrieve the entire buffer using a -1 as the length argument, and then try to print its contents. The reason for this is that VuGen may misinterpret the NULL characters within the buffer as a terminating string. Print functions include all the Message Functions such as lr_output_message.
This function is not recorded during a WinSock session—you manually insert it into your script.
You cannot use standard parameterization for any arguments in this function.