If your extension is performing some form of extended processing, and its HttpExtensionProc entry-point function has returned the status code HSE_STATUS_PENDING, then your extension should notify IIS when all processing is complete by using this support function. Calling this function will terminate the session connection.
BOOL ServerSupportFunction(
HCONN ConnID,
DWORD HSE_REQ_DONE_WITH_SESSION,
LPVOID lpvBuffer,
LPDWORD lpdwSize,
LPDWORD lpdwDataType
);
This support function must be called if the HSE_IO_DISCONNECT_AFTER_SEND parameter has been included in the HSE_TF_INFO structure, as part of an HSE_REQ_TRANSMIT_FILE request.
For the parameter lpvBuffer, IIS recognizes HSE_STATUS_SUCCESS_WITH_KEEP_CONN for keeping IIS connections alive, if the client also has requested to keep the connection alive.