nn::socket::SockAtMark Function

Syntax

s32 SockAtMark(
     s32 s
);

Arguments

Name Description
in s Specifies the socket descriptor. Specify a socket descriptor created using the Socket or Accept function.

Return Values



Value Description
1 A mark has been made indicating the socket has received out-of-band data. You can read the out-of-band data by calling the Recv function with MSG_OOB specified right after you call this function. If the protocol is TCP, this indicates that the last byte of urgent data exists at the start of the readable buffer.
0 No mark has been made indicating that out-of-band data has been received by the socket. If the protocol is TCP, note that the existence of urgent data cannot be detected until the start of the readable buffer assumes the value of the last byte of TCP urgent data.
ENETRESET Socket library is not initialized.
EBADF Invalid socket descriptor.
EINVAL Invalid processing.

Description

Determines whether the specified socket has an out-of-band data mark.

This can be used to check whether the start of the socket's readable buffer is the last byte of TCP urgent data.

See Also

Recv, RecvFrom

Revision History

2010/06/14
Initial version.

CONFIDENTIAL