12#include <boost/asio.hpp>
19 void free_host(ENetHost *host);
33 using peer_t = ENetPeer *;
47 net_e from_enum_string(
const std::string_view &view);
48 std::string_view to_enum_string(net_e net);
50 net_e from_address(
const std::string_view &view);
52 host_t host_create(af_e af, ENetAddress &addr, std::uint16_t port);
59 af_e af_from_enum_string(
const std::string_view &view);
66 std::string_view af_to_any_address_string(af_e af);
74 boost::asio::ip::address normalize_address(boost::asio::ip::address address);
82 std::string addr_to_normalized_string(boost::asio::ip::address address);
90 std::string addr_to_url_escaped_string(boost::asio::ip::address address);
97 int encryption_mode_for_address(boost::asio::ip::address address);
104 std::string mdns_instance_name(
const std::string_view &hostname);
std::uint16_t map_port(int port)
Map a specified port based on the base port.
Definition network.cpp:187
af_e
Definition network.h:42
@ IPV4
IPv4 only.
Definition network.h:43
@ BOTH
IPv4 and IPv6.
Definition network.h:44
net_e
Definition network.h:36
@ PC
PC.
Definition network.h:37
@ WAN
WAN.
Definition network.h:39
@ LAN
LAN.
Definition network.h:38
Declarations for utility functions.