12#include <boost/asio.hpp>
73 net_e from_enum_string(
const std::string_view &view);
80 std::string_view to_enum_string(net_e net);
88 net_e from_address(
const std::string_view &view);
98 host_t host_create(af_e af, ENetAddress &addr, std::uint16_t port);
105 af_e af_from_enum_string(
const std::string_view &view);
112 std::string_view af_to_any_address_string(af_e af);
119 std::string get_bind_address(af_e af);
127 boost::asio::ip::address normalize_address(boost::asio::ip::address address);
135 std::string addr_to_normalized_string(boost::asio::ip::address address);
143 std::string addr_to_url_escaped_string(boost::asio::ip::address address);
150 int encryption_mode_for_address(boost::asio::ip::address address);
157 std::string mdns_instance_name(
const std::string_view &hostname);
Unique pointer wrapper with customizable pointer and deleter types.
Definition utility.h:820
std::uint16_t map_port(int port)
Map a specified port based on the base port.
Definition network.cpp:224
void free_host(ENetHost *host)
Destroy an ENet host allocated by host_create().
Definition network.cpp:212
af_e
Enumerates supported af options.
Definition network.h:62
@ IPV4
IPv4 only.
Definition network.h:63
@ BOTH
IPv4 and IPv6.
Definition network.h:64
ENetPeer * peer_t
Raw ENet peer handle owned by an ENet host.
Definition network.h:44
net_e
Enumerates supported net options.
Definition network.h:53
@ PC
PC.
Definition network.h:54
@ WAN
WAN.
Definition network.h:56
@ LAN
LAN.
Definition network.h:55
Declarations for utility functions.