nn::http::Connection::GetHeaderField Member Function

Syntax

nn::Result GetHeaderField(
     const char * pLabel,
     char * pFieldBuf,
     size_t bufSize,
     const nn::fnd::TimeSpan & timeout,
     size_t * pFieldLengthCourier = NULL
) const;

Arguments

Name Description
in pLabel Label name.
out pFieldBuf Buffer that stores the field value.
in bufSize Data size of pFieldBuf.
in timeout Timeout interval.
out pFieldLengthCourier Buffer that stores the data size of the field value. This argument can be omitted if you don't need the data size of the field value.

Return Values

Returns the function's execution result. Returns one of the Result values listed below.
Value Description
ResultSuccess Process was successful.
ResultTimeout Error indicating a timeout.
A value other than the above. Same as for the GetHeaderField function version that has no timeout argument.

Description

This version of GetHeaderField has a timeout.

Other than allowing the user to specify a timeout, this version functions identically to GetHeaderField. 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.)

Revision History

2010/06/14
Initial version.

CONFIDENTIAL