Function SocketRecvStr() Professional

Reads data from a connected socket.

SocketRecvStr( <nSocket> , ;
               <nLength> , ;
               [@<nError>] ) --> cData
This is a numeric socket descriptor identifying a connected socket.
The number of bytes to read must be specified with this parameter.
If this parameter is passed by reference to the function, it gets assigned a numeric error code when the function fails. #define constants beginning with WSAE are available in the file SOCKET.CH to identify an error condition.

The function returns a character string containing the received data. A null string ("") is returned on error.


The function reads <nLength> bytes from a connected socket, removes them from the input queue and returns the data as a character string. If less than <nLength> bytes are available, the function blocks waiting for the remainding bytes to arrive, unless the socket is in nonblocking mode.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.