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_SERVER2_SERVER_HPP
12 #define HTTP_SERVER2_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 "io_service_pool.hpp"
21 #include "request_handler.hpp"
22 
23 namespace http {
24 namespace server2 {
25 
27 class server
28  : private boost::noncopyable
29 {
30 public:
33  explicit server(const std::string& address, const std::string& port,
34  const std::string& doc_root, std::size_t io_service_pool_size);
35 
37  void run();
38 
39 private:
41  void start_accept();
42 
44  void handle_accept(const asio::error_code& e);
45 
47  void handle_stop();
48 
50  io_service_pool io_service_pool_;
51 
53  asio::signal_set signals_;
54 
56  asio::ip::tcp::acceptor acceptor_;
57 
59  connection_ptr new_connection_;
60 
62  request_handler request_handler_;
63 };
64 
65 } // namespace server2
66 } // namespace http
67 
68 #endif // HTTP_SERVER2_SERVER_HPP
The common handler for all incoming requests.
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
server(const std::string &address, const std::string &port, const std::string &doc_root, std::size_t io_service_pool_size)
Definition: server.cpp:17
Provides signal functionality.
boost::shared_ptr< connection > connection_ptr
Definition: connection.hpp:70
Provides the ability to accept new connections.
void run()
Run the server&#39;s io_service loop.
Definition: server.cpp:47
A pool of io_service objects.
Class to represent an error code value.
Definition: error_code.hpp:80
The top-level class of the HTTP server.
Definition: server.hpp:27