Example: lrs_get_last_received_buffer_sizeBuffer Functions

Gets the size of the last buffer received.

int lrs_get_last_received_buffer_size( char *s_desc );
s_desc A descriptor identifying a socket.

The lrs_get_last_received_buffer_size function gets the size of the last received buffer on the socket s_desc. Note that function returns the length of the binary representation of data.

Use this function instead of lrs_get_last_received_buffer to confirm that data has been received on the socket and you are unconcerned about the content of the data. lrs_get_last_received_buffer_size saves on the expensive operation of copying the data from the winsocket buffer to a user's buffer when this data is not required.

lrs_get_last_received_buffer_size and lrs_get_last_received_buffer 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


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