32 using endpoint = tcp::endpoint;
33 tcp::acceptor acceptor_;
35 acceptor_(io_context) {}
39 return acceptor_.local_endpoint().port();
41 std::string address()
const
43 return acceptor_.local_endpoint().address().to_string();
45 std::string url_display(
bool ssl_used)
const
47 return (ssl_used ?
"https://" :
"http://") + acceptor_.local_endpoint().address().to_string() +
":" + std::to_string(acceptor_.local_endpoint().port());
49 tcp::acceptor& raw_acceptor()
53 endpoint local_endpoint()
const
55 return acceptor_.local_endpoint();
57 inline static tcp::acceptor::reuse_address reuse_address_option() {
return tcp::acceptor::reuse_address(
true); }
62 using endpoint = stream_protocol::endpoint;
63 stream_protocol::acceptor acceptor_;
65 acceptor_(io_context) {}
71 std::string address()
const
73 return acceptor_.local_endpoint().path();
75 std::string url_display(
bool)
const
77 return acceptor_.local_endpoint().path();
79 stream_protocol::acceptor& raw_acceptor()
83 endpoint local_endpoint()
const
85 return acceptor_.local_endpoint();
87 inline static stream_protocol::acceptor::reuse_address reuse_address_option()
90 return stream_protocol::acceptor::reuse_address(
false);