@@ -109,8 +109,9 @@ namespace Roar
109109 // ------------------------------------------------------------------------------------------------------------------
110110 boost::leaf::result<void > Server::start (unsigned short port, std::string const & host)
111111 {
112- return start (Dns::resolveSingle (
113- impl_->acceptor .get_executor (), host, port, false , boost::asio::ip::resolver_base::flags::passive));
112+ return start (
113+ Dns::resolveSingle (
114+ impl_->acceptor .get_executor (), host, port, false , boost::asio::ip::resolver_base::flags::passive));
114115 }
115116 // ------------------------------------------------------------------------------------------------------------------
116117 boost::asio::ip::basic_endpoint<boost::asio::ip::tcp> const & Server::getLocalEndpoint () const
@@ -120,25 +121,27 @@ namespace Roar
120121 // ------------------------------------------------------------------------------------------------------------------
121122 boost::leaf::result<void > Server::start (boost::asio::ip::tcp::endpoint const & bindEndpoint)
122123 {
124+ using namespace std ::string_literals;
125+
123126 stop ();
124127 boost::system::error_code ec;
125128 impl_->bindEndpoint = bindEndpoint;
126129
127130 impl_->acceptor .open (impl_->bindEndpoint .protocol (), ec);
128131 if (ec)
129- return boost::leaf::new_error (" Could not open http server acceptor." , ec);
132+ return boost::leaf::new_error (" Could not open http server acceptor." s , ec);
130133
131134 impl_->acceptor .set_option (boost::asio::socket_base::reuse_address (true ), ec);
132135 if (ec)
133- return boost::leaf::new_error (" Could not configure socket to reuse address." , ec);
136+ return boost::leaf::new_error (" Could not configure socket to reuse address." s , ec);
134137
135138 impl_->acceptor .bind (impl_->bindEndpoint , ec);
136139 if (ec)
137- return boost::leaf::new_error (" Could not bind socket." , ec);
140+ return boost::leaf::new_error (" Could not bind socket." s , ec);
138141
139142 impl_->acceptor .listen (boost::asio::socket_base::max_listen_connections, ec);
140143 if (ec)
141- return boost::leaf::new_error (" Could not listen on socket." , ec);
144+ return boost::leaf::new_error (" Could not listen on socket." s , ec);
142145
143146 impl_->resolvedEndpoint = impl_->acceptor .local_endpoint ();
144147 impl_->acceptOnce (0 );
0 commit comments