nn::http::Connection::Read Member Function

Syntax

nn::Result Read(
     u8 * pBodyBuf,
     size_t bufLen,
     const nn::fnd::TimeSpan & timeout
);

Arguments

Name Description
out pBodyBuf Buffer storing the HTTP response message body.
in bufLen Size of pBodyBuf.
in timeout Timeout interval.

Return Values

Returns the function's execution result. Returns one of the Result values listed below.


Value Description
Result::IsSuccess Process was successful.
ResultTimeout Error indicating a timeout.
A value other than the above. Refer to the version of Read that has no timeout argument.

Description

This version of Read has a timeout.

Other than allowing the caller to specify a timeout, this version functions identically to Read. For feature details, see the function reference for the version without a timeout. Returns ResultTimeout if no HTTP response has been fully received or if the buffer has not filled 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