Networking - Enums¶
Changed in version 1.3.0: An interface was extracted from each enumeration, making these more forwards-compatible.
Copperchain provides several interfaces defining the socket creation constant, and enumerations containing a set of possible values that are known to be supported by all platforms.
AddressFamily¶
The AddressFamily
interface corresponds to AF_
constants on the BSD socket API. The
StandardAddressFamilies
enumeration has the following members:
Name |
Description |
---|---|
|
Unspecified. Used as a hint for getaddrinfo(), not in the socket API. |
|
IPv4. |
|
IPv6. |
|
Unix domain sockets. |
SocketType¶
The SocketType
interface corresponds to SOCK_ constants on the BSD socket API. The
StandardSocketTypes
enumeration has the following members:
Name |
Description |
---|---|
|
Stream-based connections, such as TCP. |
|
Datagram-based connections, such as UDP. |
|
Raw sockets, for running over IP directly. |
IPProtocol¶
The IPProtocol
interface corresponds to IPROTO_
constants on the BSD socket API. The
StandardIPProtocols
enumeration has the following members:
Name |
Description |
---|---|
|
Usually signifies “kernel chooses the protocol”. |
|
Transport Control Protocol. |
|
Unreliable/User Datagram Protocol. |
|
Internet Control Message Protocol. |