forked from glynos/cpp-netlib
-
Notifications
You must be signed in to change notification settings - Fork 424
Expand file tree
/
Copy pathserver.hpp
More file actions
41 lines (32 loc) · 1.11 KB
/
server.hpp
File metadata and controls
41 lines (32 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2013 (c) Google, Inc.
// Copyright 2013 (c) Dean Michael Berris <dberris@google.com>
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef NETWORK_HTTP_SERVER_HPP_20130327
#define NETWORK_HTTP_SERVER_HPP_20130327
#include <memory>
#include <utility>
#include <functional>
#include <boost/utility/string_ref.hpp>
#include <http/server/simple_sessions.hpp>
namespace network {
namespace http {
struct dynamic_dispatcher;
struct no_auth;
struct default_connection_manager;
struct connection;
template <class Handler = dynamic_dispatcher,
class SessionManager = simple_sessions, class Authenticator = no_auth,
class ConnectionManager = default_connection_manager>
struct basic_server {
void register_handler(
boost::string_ref spec,
std::function<void(
session &,
std::shared_ptr<connection>)> handler);
};
typedef basic_server<> server;
} // namespace http
} // namespace network
#endif /* end of include guard: NETWORK_HTTP_SERVER_HPP_20130327 */