Function SocketRecvStr() Professional

Reads data from a connected socket.

Syntax
SocketRecvStr( <nSocket> , ;
               <nLength> , ;
               [@<nError>] ) --> cData
Parameters
<nSocket>
This is a numeric socket descriptor identifying a connected socket.
<nLength>
The number of bytes to read must be specified with this parameter.
<nError>
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.
Return

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

Description

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.

Feedback

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.