SocketOption

Specifies a socket option:

Values

ValueMeaning
DEBUGSO_DEBUG

Record debugging information

BROADCASTSO_BROADCAST

Allow transmission of broadcast messages

REUSEADDRSO_REUSEADDR

Allow local reuse of address

LINGERSO_LINGER

Linger on close if unsent data is present

OOBINLINESO_OOBINLINE

Receive out-of-band data in band

SNDBUFSO_SNDBUF

Send buffer size

RCVBUFSO_RCVBUF

Receive buffer size

DONTROUTESO_DONTROUTE

Do not route

SNDTIMEOSO_SNDTIMEO

Send timeout

RCVTIMEOSO_RCVTIMEO

Receive timeout

ERRORSO_ERROR

Retrieve and clear error status

KEEPALIVESO_KEEPALIVE

Enable keep-alive packets

ACCEPTCONNSO_ACCEPTCONN

Listen

RCVLOWATSO_RCVLOWAT

Minimum number of input bytes to process

SNDLOWATSO_SNDLOWAT

Minimum number of output bytes to process

TYPESO_TYPE

Socket type

TCP_NODELAY.TCP_NODELAY

Disable the Nagle algorithm for send coalescing

IPV6_UNICAST_HOPS.IPV6_UNICAST_HOPS

IP unicast hop limit

IPV6_MULTICAST_IF.IPV6_MULTICAST_IF

IP multicast interface

IPV6_MULTICAST_LOOP.IPV6_MULTICAST_LOOP

IP multicast loopback

IPV6_MULTICAST_HOPS.IPV6_MULTICAST_HOPS

IP multicast hops

IPV6_JOIN_GROUP.IPV6_JOIN_GROUP

Add an IP group membership

IPV6_LEAVE_GROUP.IPV6_LEAVE_GROUP

Drop an IP group membership

IPV6_V6ONLY.IPV6_V6ONLY

Treat wildcard bind as AF_INET6-only

Meta