File tree Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 11
11
#include < utility>
12
12
#include < functional>
13
13
#include < boost/utility/string_ref.hpp>
14
+ #include < http/server/simple_sessions.hpp>
14
15
15
16
namespace network {
16
17
namespace http {
17
18
18
19
struct dynamic_dispatcher ;
19
- struct simple_sessions ;
20
20
struct no_auth ;
21
21
struct default_connection_manager ;
22
+ struct connection ;
22
23
23
24
template <class Handler = dynamic_dispatcher,
24
25
class SessionManager = simple_sessions, class Authenticator = no_auth,
@@ -27,8 +28,8 @@ struct basic_server {
27
28
void register_handler (
28
29
boost::string_ref spec,
29
30
std::function<void (
30
- typename SessionManager:: session &,
31
- std::shared_ptr<typename ConnectionManager:: connection>)> handler);
31
+ session &,
32
+ std::shared_ptr<connection>)> handler);
32
33
};
33
34
34
35
typedef basic_server<> server;
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ if (CPP-NETLIB_BUILD_TESTS)
86
86
add_test (cpp-netlib-http-client_test
87
87
${CPP-NETLIB_BINARY_DIR}/tests/cpp-netlib-http-${test} )
88
88
89
- set (SERVER_TESTS server_simple_sessions_test server_dynamic_dispatcher_test )
89
+ set (SERVER_TESTS server_simple_sessions_test server_dynamic_dispatcher_test server_test )
90
90
foreach (test ${SERVER_TESTS} )
91
91
add_executable (cpp-netlib-http-${test} ${test} .cpp )
92
92
add_dependencies (cpp-netlib-http-${test} cppnetlib-http-server )
Original file line number Diff line number Diff line change
1
+ // Copyright 2013 (c) Google, Inc.
2
+ // Copyright 2013 (c) Dean Michael Berris <dberris@google.com>
3
+ // Distributed under the Boost Software License, Version 1.0.
4
+ // (See accompanying file LICENSE_1_0.txt or copy at
5
+ // http://www.boost.org/LICENSE_1_0.txt)
6
+
7
+ #include < gtest/gtest.h>
8
+ #include < http/server.hpp>
9
+
10
+ namespace http = network::http;
11
+ namespace net = network;
12
+
13
+ namespace {
14
+
15
+ TEST (server_test, constructor) {
16
+ http::server server;
17
+ (void ) server;
18
+ }
19
+
20
+ } // namespace
You can’t perform that action at this time.
0 commit comments