nn::socket::Shutdown Function

Syntax

s32 Shutdown(
     s32 s,
     s32 how
);

Arguments

Name Description
in s Specifies a socket descriptor. Specify a socket descriptor created using the Socket or Accept function.
in how Specifies the type of disconnection method.
SHUT_RD: Disallow any further receiving.
SHUT_WR: Disallow any further sending.
SHUT_RDWR: Disallow any further sending or receiving.

Return Values



Value Description
0 Process was successful.
EBADF The socket descriptor is invalid.
EINVAL Indicates an illegal call of one of the following. The disconnection method specified by how is invalid.
ENETDOWN The network is not available.
ENETRESET Socket library is not initialized.
ENOMEM Cannot allocate the memory required for the process.
ENOTCONN The specified socket cannot be used by the process because it is closed.

Description

This function shuts down some or all socket send/receive processes.

See Also

Socket
Close

Revision History

2010/06/14
Initial version.

CONFIDENTIAL