|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Classes | |
| class | IPv4Address |
| 32-bit IP address of an IPv4 endpoint. More... | |
| class | IPv6Address |
| 128-bit IP address of an IPv6 endpoint. More... | |
| class | IPv4Endpoint |
| Combined IPv4Address and PortNumber. More... | |
| class | IPv6Endpoint |
| Combined IPv6Address, PortNumber and ScopeID. More... | |
| class | Endpoint |
| Combined network address and port number (and potentially other info) that identifies a host, or set of hosts, on the network. More... | |
| struct | Error |
| Exception type for domain-specific errors originating from the grem::networking module. More... | |
| struct | EndpointErrorCategory |
| Error category type for error codes originating from the getaddrinfo() API. More... | |
| struct | SocketErrorCategory |
| Error category type for error codes originating from the Socket API. More... | |
| class | Socket |
| Generic socket handle/file descriptor for receiving and transmitting data across the network. More... | |
| struct | UDPSocketOptions |
| Configuration options for a UDPSocket. More... | |
| class | UDPSocket |
| Connectionless socket for receiving and transmitting unordered, unreliable datagrams across the network over ProtocolType::UDP. More... | |
| struct | TCPSocketOptions |
| Configuration options for a TCPSocket. More... | |
| class | TCPSocket |
| Connection-oriented socket for receiving and transmitting ordered, reliable streams of data across the network over ProtocolType::TCP. More... | |
| struct | TCPListenerOptions |
| Configuration options for a TCPListener. More... | |
| class | TCPListener |
| Listener socket for accepting incoming connections across the network over ProtocolType::TCP. More... | |
Typedefs | |
| using | PortNumber = uint16_t |
| IP port number (0-65535). | |
| using | ScopeID = uint32_t |
| IPv6 scope/zone ID. | |
Enumerations | |
| enum class | AddressFamily : short { IPv4 = AF_INET , IPv6 = AF_INET6 } |
| Address family of an IP endpoint. More... | |
| enum class | EndpointError : int { AGAIN = EAI_AGAIN , BADFLAGS = EAI_BADFLAGS , FAIL = EAI_FAIL , FAMILY = EAI_FAMILY , MEMORY = EAI_MEMORY , NODATA = EAI_NODATA , NONAME = EAI_NONAME , SERVICE = EAI_SERVICE , SOCKTYPE = EAI_SOCKTYPE } |
| Error code value type for error codes originating from the getaddrinfo() API. More... | |
| enum class | SocketError : int { WAIT = 1 , PARTIAL , DISCONNECTED , FAILED } |
| Error condition type for error codes originating from the Socket API. More... | |
| enum class | BlockingMode : uint8_t { UNSPECIFIED , BLOCKING , NON_BLOCKING } |
| Blocking mode of a Socket. More... | |
| enum class | ProtocolType : int { UDP = SOCK_DGRAM , TCP = SOCK_STREAM } |
| Communication semantics of a Socket. More... | |
| enum class | ShutdownType : int { RECEIVE = SD_RECEIVE , SEND = SD_SEND , BOTH = SD_BOTH } |
| Direction(s) in which to shut down the connection of a Socket. More... | |
| enum class | MessageFlags : int |
| Strong type for a bitmask of native MSG_... flags. More... | |
Functions | |
| std::error_code | make_error_code (EndpointError error) |
| Create a std::error_code from an EndpointError value. | |
| std::error_code | make_error_code (SocketError error) |
| Create a std::error_code from a SocketError value. | |
| std::error_condition | make_error_condition (SocketError error) |
| Create a std::error_condition from a SocketError value. | |
| void | ensurePlatformInitialized (std::error_code &errorCode) |
| Initialize the underlying platform of the native socket API if it has not already been initialized. | |
| using grem::networking::PortNumber = uint16_t |
IP port number (0-65535).
| using grem::networking::ScopeID = uint32_t |
IPv6 scope/zone ID.
|
strong |
|
strong |
|
strong |
Error condition type for error codes originating from the Socket API.
| Enumerator | |
|---|---|
| WAIT | Try again later. |
| PARTIAL | The data was partially transmitted. |
| DISCONNECTED | The socket disconnected. |
| FAILED | The operation failed. |
|
strong |
Blocking mode of a Socket.
| Enumerator | |
|---|---|
| UNSPECIFIED | Preserve current blocking mode. |
| BLOCKING | Enable blocking. |
| NON_BLOCKING | Disable blocking. |
|
strong |
Communication semantics of a Socket.
| Enumerator | |
|---|---|
| UDP | User Datagram Protocol (connectionless, unreliable messages of a fixed maximum length). |
| TCP | Transmission Control Protocol (connection-based, sequenced, reliable two-way data stream). |
|
strong |
Direction(s) in which to shut down the connection of a Socket.
| Enumerator | |
|---|---|
| RECEIVE | Shut down further receptions. |
| SEND | Shut down further transmissions. |
| BOTH | Shut down both further receptions and transmissions. |
|
strong |
Strong type for a bitmask of native MSG_... flags.
|
inlinenodiscard |
Create a std::error_code from an EndpointError value.
| error | error code value to create the error code from. |
|
inlinenodiscard |
Create a std::error_code from a SocketError value.
| error | error code value to create the error code from. |
|
inlinenodiscard |
Create a std::error_condition from a SocketError value.
| error | error condition value to create the error code from. |
| void grem::networking::ensurePlatformInitialized | ( | std::error_code & | errorCode | ) |
Initialize the underlying platform of the native socket API if it has not already been initialized.
| errorCode | error code that is filled in on failure to initialize the platform, or cleared on success. |