Realistic 3D camera system
3D camera system components
server.hpp
Go to the documentation of this file.
1 //
2 // server.hpp
3 // ~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 //
10 
11 #ifndef HTTP_SERVER3_SERVER_HPP
12 #define HTTP_SERVER3_SERVER_HPP
13 
14 #include <asio.hpp>
15 #include <string>
16 #include <vector>
17 #include <boost/noncopyable.hpp>
18 #include <boost/shared_ptr.hpp>
19 #include "connection.hpp"
20 #include "request_handler.hpp"
21 
22 namespace http {
23 namespace server3 {
24 
26 class server
27  : private boost::noncopyable
28 {
29 public:
32  explicit server(const std::string& address, const std::string& port,
33  const std::string& doc_root, std::size_t thread_pool_size);
34 
36  void run();
37 
38 private:
40  void start_accept();
41 
43  void handle_accept(const asio::error_code& e);
44 
46  void handle_stop();
47 
49  std::size_t thread_pool_size_;
50 
52  asio::io_service io_service_;
53 
55  asio::signal_set signals_;
56 
58  asio::ip::tcp::acceptor acceptor_;
59 
61  connection_ptr new_connection_;
62 
64  request_handler request_handler_;
65 };
66 
67 } // namespace server3
68 } // namespace http
69 
70 #endif // HTTP_SERVER3_SERVER_HPP
The common handler for all incoming requests.
Provides core I/O functionality.
Definition: io_service.hpp:184
pylon Camera Software Suite for Linux for Use with Basler Gigabit the pylon Viewer and the IP Configurator applications might not be available System I340 and I350 series Although the pylon software will work with any GigE network we would recommend to use one of these adapters USB For U3V devices a USB3 capable USB controller is necessary For best performance and stability we highly recommend a kernel the following settings should be i e
boost::shared_ptr< connection > connection_ptr
Definition: connection.hpp:73
Provides signal functionality.
The top-level class of the HTTP server.
Definition: server.hpp:26
Provides the ability to accept new connections.
void run()
Run the server&#39;s io_service loop.
Definition: server.cpp:49
Class to represent an error code value.
Definition: error_code.hpp:80
server(const std::string &address, const std::string &port, const std::string &doc_root, std::size_t thread_pool_size)
Definition: server.cpp:19