nn::http::Connection::GetHeaderAll Member Function

Syntax

nn::Result GetHeaderAll(
     char * pHeaderBuf,
     size_t bufSize,
     size_t * pLengthCourier = NULL
) const;

nn::Result GetHeaderAll(
     char * pHeaderBuf,
     size_t bufSize,
     const nn::fnd::TimeSpan & timeout,
     size_t * pLengthCourier = NULL
) const;

List of Overloaded Member Functions

GetHeaderAll(char *, size_t, size_t *) Gets the message header for the HTTP response that was received.
GetHeaderAll(char *, size_t, const nn::fnd::TimeSpan &, size_t *) This version of GetHeaderAll has a timeout.

Description of GetHeaderAll(char *, size_t, size_t *)

This function blocks until the header is completely received. See the description of GetHeaderField for more details about this specification.

Note: If the pHeaderBuf size is smaller than the header size, as much data is stored in pHeaderBuf as will fit, and the header size is stored in pLengthCourier.

Note: If pHeaderBuf==NULL or bufSize==0, and if pLengthCourier!=NULL, the field length is stored in pLengthCourier.

Note: Unlike the version of GetHeaderAll that includes a timeout, this function does not time out. In other words, control will not return from this function until processing has ended. In environments where communications are slow you can expect a long time to pass before processing ends and control returns from this function.

Description of GetHeaderAll(char *, size_t, const nn::fnd::TimeSpan &, size_t *)

Other than the ability to specify a timeout, this version functions identically to GetHeaderAll. For feature details, see the function reference for the version without a timeout. Returns ResultTimeout if no HTTP response header has been fully received within the timeout period. If ResultTimeout is returned, the connection is automatically canceled. (In other words, the function internally implements Cancel.)


CONFIDENTIAL