![]() |
DDNet documentation
|
Classes | |
| struct | NETSTATS |
Typedefs | |
| typedef struct NETSOCKET_INTERNAL * | NETSOCKET |
| typedef struct NETSTATS | NETSTATS |
Functions | |
| void | net_init () |
| int | net_errno () |
| std::string | net_error_message () |
| void | net_stats (NETSTATS *stats) |
| int | net_socket_type (NETSOCKET sock) |
| int | net_set_non_blocking (NETSOCKET sock) |
| int | net_set_blocking (NETSOCKET sock) |
| int | net_would_block () |
| int | net_socket_read_wait (NETSOCKET sock, std::chrono::nanoseconds nanoseconds) |
Variables | |
| constexpr auto | NETTYPE_INVALID = 0 |
| constexpr auto | NETTYPE_IPV4 = 1 << 0 |
| constexpr auto | NETTYPE_IPV6 = 1 << 1 |
| constexpr auto | NETTYPE_WEBSOCKET_IPV4 = 1 << 2 |
| constexpr auto | NETTYPE_WEBSOCKET_IPV6 = 1 << 3 |
| constexpr auto | NETTYPE_LINK_BROADCAST = 1 << 4 |
| constexpr auto | NETTYPE_TW7 = 1 << 5 |
| constexpr auto | NETTYPE_ALL = NETTYPE_IPV4 | NETTYPE_IPV6 | NETTYPE_WEBSOCKET_IPV4 | NETTYPE_WEBSOCKET_IPV6 |
| constexpr auto | NETTYPE_MASK = NETTYPE_ALL | NETTYPE_LINK_BROADCAST | NETTYPE_TW7 |
| typedef struct NETSOCKET_INTERNAL* NETSOCKET |
| typedef struct NETSTATS NETSTATS |
| int net_errno | ( | ) |
If a network operation failed, the error code.
| std::string net_error_message | ( | ) |
If a network operation failed, the platform-specific error code and string.
| void net_init | ( | ) |
Initializes network functionality.
| int net_set_blocking | ( | NETSOCKET | sock | ) |
Make a socket block on operations.
| sock | The socket to set blocking mode on. |
| int net_set_non_blocking | ( | NETSOCKET | sock | ) |
Make a socket not block on operations.
| sock | The socket to set non-blocking mode on. |
| int net_socket_read_wait | ( | NETSOCKET | sock, |
| std::chrono::nanoseconds | nanoseconds ) |
Waits for a socket to have data available to receive up the specified timeout duration.
| sock | Socket to wait on. |
| nanoseconds | Timeout duration to wait. |
| int net_socket_type | ( | NETSOCKET | sock | ) |
Determine a socket's type.
| sock | Socket whose type should be determined. |
| void net_stats | ( | NETSTATS * | stats | ) |
Retrieve network statistics.
| stats | Network statistics to fill in. |
| int net_would_block | ( | ) |
Determines whether a network operation would block.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
0.7 address. This is a flag in NETADDR to avoid introducing a parameter to every networking function to differentiate between 0.6 and 0.7 connections.
|
inlineconstexpr |
|
inlineconstexpr |