#include <dolphin/ip.h>
#include <dolphin/socket.h>
s32 TCPSetSockOpt( TCPInfo* info, int level, int optname,
const void* optval, int optlen );
TCPSetSockOpt() specifies the options with a TCPInfo.
The supported options are summarized in the following table:
| Level | Option name | Type | Description |
SO_SOL_SOCKET |
SO_SO_REUSEADDR |
BOOL |
Allows reuse of the local address. |
SO_SOL_SOCKET |
SO_SO_OOBINLINE |
BOOL |
Receives urgent byte in band. |
SO_SOL_IP |
SO_IP_TOS |
int |
Type of service. |
SO_SOL_IP |
SO_IP_TTL |
int |
Time To Live. |
SO_SOL_TCP |
SO_TCP_NODELAY |
BOOL |
Turn the Nagle's algorithm off. |
info |
Pointer to TCPInfo to set option. |
level |
Protocol level (one of SO_SO_*). |
optname |
Option name to set (one of SO_* shown above). |
optval |
Option value to set. |
optlen |
Option length. |
IP_ERR_NONE |
Succeeded. |
IP_ERR_INVALID |
info is not a valid TCPInfo.
Specified option data/length is invalid. |
IP_ERR_INV_OPTION |
Specified option is not supported. |