HttpWaitForDisconnect function

The HttpWaitForDisconnect function notifies the application when the connection to an HTTP client is broken for any reason.

Syntax


ULONG HttpWaitForDisconnect(
  _In_  HANDLE ReqQueueHandle,
  _In_  HTTP_CONNECTION_ID ConnectionId,
  _In_  LPOVERLAPPED pOverlapped
);

Parameters

ReqQueueHandle [in]

A handle to the request queue that handles requests from the specified connection. A request queue is created and its handle returned by a call to the HttpCreateRequestQueue function.

Windows Server 2003 with SP1 and Windows XP with SP2:  The handle to the request queue is created by the HttpCreateHttpHandle function.

ConnectionId [in]

Identifier for the connection to the client computer. This value is returned in the ConnectionID member of the HTTP_REQUEST structure by a call to the HttpReceiveHttpRequest function.

pOverlapped [in]

For asynchronous calls, set pOverlapped to point to an OVERLAPPED structure; for synchronous calls, set it to NULL.

A synchronous call blocks until the connection is broken, whereas an asynchronous call immediately returns ERROR_IO_PENDING and the calling application then uses GetOverlappedResult or I/O completion ports to determine when the operation is completed. For information about using OVERLAPPED structures for synchronization, see Synchronization and Overlapped Input and Output.

Return value

If the function succeeds, the return value is NO_ERROR.

If the function is used asynchronously, a return value of ERROR_IO_PENDING indicates that the next request is not yet ready and is retrieved later through normal overlapped I/O completion mechanisms.

If the function fails, the return value is one of the following error codes.

ValueMeaning
ERROR_INVALID_PARAMETER

One or more of the supplied parameters is in an unusable form.

Other

A system error code defined in WinError.h.

 

Requirements

Minimum supported client

Windows Vista, Windows XP with SP2 [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Http.h

Library

Httpapi.lib

DLL

Httpapi.dll

See also

HTTP Server API Version 1.0 Functions
HTTP_REQUEST

 

 

Community Additions

ADD
Show:
© 2014 Microsoft