TCPShutdown


C Specification

#include <dolphin/ip.h>

#define TCP_SHUTDOWN_RECEIVE  0   // Disallow further receives
#define TCP_SHUTDOWN_SEND     1   // Disallow further sends
#define TCP_SHUTDOWN_BOTH     2   // Disallow further receives and sends

s32 TCPShutdown ( TCPInfo* info, u32 flag );

Description

TCPShutdown() closes the connection only in the specified direction(s) and makes the connection be half closed. A host is permitted to continue sending or receiving data in the open direction. To reuse info, it must be closed with TCPCloseAsync() even after both directions are closed with TCPShutdown().

Arguments

info Pointer to TCPInfo to close.
flag One of TCP_SHUTDOWN_* that specifies the close direction(s).

Return Values

IP_ERR_NONE Succeeded.
IP_ERR_INVALID info is not a valid TCPInfo.
IP_ERR_NOT_EXIST Connection does not exist.
IP_ERR_CLOSING Connection closing.

See Also

TCPCloseAsync()