24
24
*/
25
25
#include " nghttp2_config.h"
26
26
27
- #include < nghttp2/asio_http2_server .h>
27
+ #include < nghttp2/asio_httpx_server .h>
28
28
29
- #include " asio_server_http2_impl .h"
29
+ #include " asio_server_httpx_impl .h"
30
30
#include " asio_server.h"
31
31
#include " template.h"
32
32
@@ -36,13 +36,13 @@ namespace asio_http2 {
36
36
37
37
namespace server {
38
38
39
- http2::http2 (const H2Server_Config_Schema& conf) : impl_(std::make_unique<http2_impl >(conf)) {}
39
+ asio_httpx_server::asio_httpx_server (const H2Server_Config_Schema& conf) : impl_(std::make_unique<asio_server_httpx_impl >(conf)) {}
40
40
41
- http2 ::~http2 () {}
41
+ asio_httpx_server ::~asio_httpx_server () {}
42
42
43
- http2::http2 (http2 &&other) noexcept : impl_(std::move(other.impl_)) {}
43
+ asio_httpx_server::asio_httpx_server (asio_httpx_server &&other) noexcept : impl_(std::move(other.impl_)) {}
44
44
45
- http2 &http2 ::operator =(http2 &&other) noexcept {
45
+ asio_httpx_server &asio_httpx_server ::operator =(asio_httpx_server &&other) noexcept {
46
46
if (this == &other) {
47
47
return *this ;
48
48
}
@@ -52,45 +52,45 @@ http2 &http2::operator=(http2 &&other) noexcept {
52
52
return *this ;
53
53
}
54
54
55
- boost::system::error_code http2 ::listen_and_serve (boost::system::error_code &ec,
55
+ boost::system::error_code asio_httpx_server ::listen_and_serve (boost::system::error_code &ec,
56
56
const std::string &address,
57
57
const std::string &port,
58
58
bool asynchronous) {
59
59
return impl_->listen_and_serve (ec, nullptr , address, port, asynchronous);
60
60
}
61
61
62
- boost::system::error_code http2 ::listen_and_serve (
62
+ boost::system::error_code asio_httpx_server ::listen_and_serve (
63
63
boost::system::error_code &ec, boost::asio::ssl::context &tls_context,
64
64
const std::string &address, const std::string &port, bool asynchronous) {
65
65
return impl_->listen_and_serve (ec, &tls_context, address, port, asynchronous);
66
66
}
67
67
68
- void http2 ::num_threads (size_t num_threads) { impl_->num_threads (num_threads); }
68
+ void asio_httpx_server ::num_threads (size_t num_threads) { impl_->num_threads (num_threads); }
69
69
70
- void http2 ::backlog (int backlog) { impl_->backlog (backlog); }
70
+ void asio_httpx_server ::backlog (int backlog) { impl_->backlog (backlog); }
71
71
72
- void http2 ::tls_handshake_timeout (const boost::posix_time::time_duration &t) {
72
+ void asio_httpx_server ::tls_handshake_timeout (const boost::posix_time::time_duration &t) {
73
73
impl_->tls_handshake_timeout (t);
74
74
}
75
75
76
- void http2 ::read_timeout (const boost::posix_time::time_duration &t) {
76
+ void asio_httpx_server ::read_timeout (const boost::posix_time::time_duration &t) {
77
77
impl_->read_timeout (t);
78
78
}
79
79
80
- bool http2 ::handle (std::string pattern, request_cb cb) {
80
+ bool asio_httpx_server ::handle (std::string pattern, request_cb cb) {
81
81
return impl_->handle (std::move (pattern), std::move (cb));
82
82
}
83
83
84
- void http2 ::stop () { impl_->stop (); }
84
+ void asio_httpx_server ::stop () { impl_->stop (); }
85
85
86
- void http2 ::join () { return impl_->join (); }
86
+ void asio_httpx_server ::join () { return impl_->join (); }
87
87
88
88
const std::vector<std::shared_ptr<boost::asio::io_service>> &
89
- http2 ::io_services () const {
89
+ asio_httpx_server ::io_services () const {
90
90
return impl_->io_services ();
91
91
}
92
92
93
- std::vector<int > http2 ::ports () const { return impl_->ports (); }
93
+ std::vector<int > asio_httpx_server ::ports () const { return impl_->ports (); }
94
94
95
95
} // namespace server
96
96
0 commit comments