HSE_REQ_CLOSE_CONNECTION

This server support function sends a request to IIS to close the current client socket connection, even if there is an asynchronous read pending.

Important   Once you use the HSE_REQ_CLOSE_CONNECTION server support function to close a connection, you must wait for IIS to call the asynchronous I/O function (specified by HSE_REQ_IO_COMPLETION) before you end the session with HSE_REQ_DONE_WITH_SESSION. HSE_REQ_CLOSE_CONNECTION closes the client socket connection immediately, but IIS takes a small amount of time to handle the threads in the thread pool before the connection can be completely removed.

BOOL ServerSupportFunction(

  HCONN ConnID,  

  DWORD HSE_REQ_CLOSE_CONNECTION, 

  LPVOID lpvBuffer,  

  LPDWORD lpdwSize,  

  LPDWORD lpdwDataType

);

 

Parameters
ConnID
Specifies the connection identifier of the client to which the response data should be sent.
lpvBuffer
Unused in this ServerSupportFunction request type.
lpdwSizeofBuffer
Unused in this ServerSupportFunction request type.
lpdwDataType
Unused in this ServerSupportFunction request type.
Remarks

If you wish to close a client connection, and you do not have a pending asynchronous read operation, then you should not use the HSE_REQ_CLOSE_CONNECTION server support function. Use the HSE_STATUS_SUCCESS return value when in HttpExtensionProc, or use the HSE_REQ_DONE_WITH_SESSION function with ServerSupportFunction.

See Also

Asynchronous I/O Processing