CHttpServer::SendResponseData Method  
 
INT SendResponseData(
  UINT nClientId,  
  LPBYTE lpBuffer,  
  INT nLength  
);

Send additional data to the client in response to a command.

Parameters

nClientId
An unsigned integer which uniquely identifies the client session.
lpBuffer
A pointer to a buffer that contains the response data that should be sent to the client. This parameter cannot be NULL.
nLength
An integer that specifies the number of bytes of data in the buffer. This value must be greater than zero.

Return Value

If the method succeeds, the return value is the number of bytes of data sent to the client. If the method fails, the return value is HTTP_ERROR. To get extended error information, call the GetLastError method.

Remarks

The SendResponseData method is called within a OnCommand event handler to send data to the client in response to a request. This method can only be used to send dynamically generated content after the SendResponse method has been called. The HTTP_RESPONSE_DYNAMIC option must have been specified when responding to the client or this method will fail.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Import Library: cshtsv11.lib
Unicode: Implemented as Unicode and ANSI versions

See Also

RecieveRequest, SendResponse, OnCommand, HTTPRESPONSE