1
0
Fork 0
mirror of https://gitlab.com/niansa/libcrosscoro.git synced 2025-03-06 20:53:32 +01:00
libcrosscoro/src/net/ip_address.cpp
2021-01-16 20:27:11 -07:00

20 lines
456 B
C++

#include "coro/net/ip_address.hpp"
namespace coro::net
{
static std::string domain_ipv4{"ipv4"};
static std::string domain_ipv6{"ipv6"};
auto to_string(domain_t domain) -> const std::string&
{
switch (domain)
{
case domain_t::ipv4:
return domain_ipv4;
case domain_t::ipv6:
return domain_ipv6;
}
throw std::runtime_error{"coro::net::to_string(domain_t) unknown domain"};
}
} // namespace coro::net