Compartilhar via


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.

ms524613.alert_caution(en-us,VS.90).gifImportant Note:

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 dwServerSupportFunction,
      LPVOID lpvBuffer,
      LPDWORD lpdwSizeofBuffer,
      LPDWORD lpdwDataType
);

Parameters

  • ConnID
    Specifies the connection identifier of the client to which the response data should be sent.

  • dwServerSupportFunction
    The name of the Server Support function, which in this case must be set to HSE_REQ_CLOSE_CONNECTION.

  • 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 Function, or use the HSE_REQ_DONE_WITH_SESSION function with ServerSupportFunction Function.

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

Header: Declared in httpext.h.

See Also