Microsoft Internet Security and Acceleration Server 2004 SDK

WriteClient

The WriteClient callback function is called by a Web filter to send data to the client.

The WriteClient callback function is declared as:

BOOL WINAPI * WriteClient(
  struct _HTTP_FILTER_CONTEXT* pfc,
  LPVOID Buffer,
  LPDWORD lpdwBytes,
  DWORD dwReserved
);

Parameters

pfc
Pointer to the HTTP_FILTER_CONTEXT data structure that is associated with the current, active HTTP session. Pass the filter context in this parameter.
Buffer
Pointer to a buffer containing data to send to the client.
lpdwBytes
Pointer to the size of the buffer pointed to by the Buffer parameter.
dwReserved
Reserved for future use.

Return Values

Returns TRUE if the function succeeded, or FALSE if the function failed.

Remarks

For more information about the correct usage of WriteClient, see SF_REQ_SEND_RESPONSE_HEADER.

The WriteClient callback function is synchronous and and blocks the thread from which it is called until the IO operation is completed. A Web filter sending a large amount of data in calls to this function can block all of the available worker threads with a resultant denial of service (DoS).

Requirements

Server: Requires Windows Server 2003 or Windows 2000.
Version: Requires Internet Security and Acceleration Server 2004.
Header: Declared in Wpxhttpfilt.h.

See Also

Callback Functions