From 492895921353c2fa5f4b031c2b73c6d496e245ff Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 22 Apr 2015 22:25:16 +0900 Subject: [PATCH] asio: Document asynchronous parameter for listen_and_serve --- src/includes/nghttp2/asio_http2_server.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/includes/nghttp2/asio_http2_server.h b/src/includes/nghttp2/asio_http2_server.h index b3386425..1c5a71fd 100644 --- a/src/includes/nghttp2/asio_http2_server.h +++ b/src/includes/nghttp2/asio_http2_server.h @@ -136,14 +136,20 @@ public: http2 &operator=(http2 &&other) noexcept; // Starts listening connection on given address and port and serves - // incoming requests in cleartext TCP connection. + // incoming requests in cleartext TCP connection. If |asynchronous| + // is false, this function blocks forever unless there is an error. + // If it is true, after server has started, this function returns + // immediately, and the caller should call join() to shutdown server + // gracefully. boost::system::error_code listen_and_serve(boost::system::error_code &ec, const std::string &address, const std::string &port, bool asynchronous = false); // Starts listening connection on given address and port and serves - // incoming requests in SSL/TLS encrypted connection. + // incoming requests in SSL/TLS encrypted connection. For + // |asynchronous| parameter, see cleartext version + // |listen_and_serve|. boost::system::error_code listen_and_serve(boost::system::error_code &ec, boost::asio::ssl::context &tls_context,