nn::ssl::Connection::Read Member Function

Syntax

nn::Result Read(
     u8 * pDataBuf,
     size_t dataBufSize,
     size_t * pReadSizeCourier = NULL
);

Arguments

Name Description
out pDataBuf Buffer storing the data.
in dataBufSize Size of pDataBuf.
out pReadSizeCourier Buffer storing the size of data already read. (May be omitted if the size of data already read is not needed.)

Return Values

Returns the function's execution result. Returns one of the Result values listed below.
Value Description
ResultSuccess Process was successful.
ResultSocketZeroReturn Indicates that the receive function (nn::socket::Read, etc.) returned 0. Returned if the SSL connection was closed by the server. This can occur, for example, when all data has been read.
ResultProtocolFailedErr Error due to SSL protocol failure. To reconnect, first call the Connection class's Finalize function, and then call Initialize again.
ResultWantRead Indicates, when an asynchronous socket was being used, that the receive function (nn::socket::Read, etc.) returned without waiting for the operation to complete. Please try again.
ResultSystemCallErr Indicates that the library function being used internally (mostly the socket functions) returned an unexpected error. (There was an abnormal response from the server, etc.) To reconnect, first call the Connection class's Finalize function, and then call Initialize again.
ResultIpcSessionErr Error indicating an uninitialized connection. The function has not done anything as it has been called on a Connection instance for which you have not yet successfully called Initialize.
ResultNotInitializedErr Error indicating that the library is not initialized. None of the functions in this library can be run without first running nn::ssl::Initialize.
A value other than the above. Unexpected error (see ssl_Result.h for error details).

Description

Loads data over an SSL connection.

ResultSuccess is returned upon successful reads. ResultSocketZeroReturn is returned if this function is called when all data has already been read.

Revision History

2010/06/14
Initial version.

CONFIDENTIAL