ReadClient

The ReadClient function reads data from the body of the client's HTTP request.

BOOL ReadClient(

    HCONN hConn,

 

    LPVOID lpvBuffer,

 

    LPDWORD lpdwSize

 

   );

 

Parameters

hConn

[in] A connection handle.

lpvBuffer

[out] A pointer to the buffer area to receive the requested information.

lpdwSize

[in/out] A pointer to DWORD indicating the number of bytes available in the buffer. On return, lpdwSize will contain the number of bytes actually transferred into the buffer.

 

Return Values

If the function is successful, a value of TRUE is returned. If an error occurs, a value of FALSE is returned. The GetLastError function can be called to determine the cause of the error.

Remarks

The ReadClient function reads information from the body of the Web client's HTTP request into the buffer supplied by the caller. Thus, the call can be used to read data from an HTML form that uses the POST method. If more than lpdwSize bytes are immediately available to be read, ReadClient will return after transferring that amount of data into the buffer. Otherwise, it will block and wait for data to become available. If the socket on which the server is listening to the client is closed, it will return TRUE, but with zero bytes read.