Realistic 3D camera system
3D camera system components
connection.hpp
Go to the documentation of this file.
1 //
2 // connection.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_CONNECTION_HPP
12 #define HTTP_SERVER2_CONNECTION_HPP
13 
14 #include <asio.hpp>
15 #include <boost/array.hpp>
16 #include <boost/noncopyable.hpp>
17 #include <boost/shared_ptr.hpp>
18 #include <boost/enable_shared_from_this.hpp>
19 #include "reply.hpp"
20 #include "request.hpp"
21 #include "request_handler.hpp"
22 #include "request_parser.hpp"
23 
24 namespace http {
25 namespace server2 {
26 
29  : public boost::enable_shared_from_this<connection>,
30  private boost::noncopyable
31 {
32 public:
34  explicit connection(asio::io_service& io_service,
35  request_handler& handler);
36 
39 
41  void start();
42 
43 private:
45  void handle_read(const asio::error_code& e,
46  std::size_t bytes_transferred);
47 
49  void handle_write(const asio::error_code& e);
50 
52  asio::ip::tcp::socket socket_;
53 
55  request_handler& request_handler_;
56 
59 
61  request request_;
62 
64  request_parser request_parser_;
65 
67  reply reply_;
68 };
69 
70 typedef boost::shared_ptr<connection> connection_ptr;
71 
72 } // namespace server2
73 } // namespace http
74 
75 #endif // HTTP_SERVER2_CONNECTION_HPP
The common handler for all incoming requests.
A request received from a client.
Definition: request.hpp:22
Provides core I/O functionality.
Definition: io_service.hpp:184
connection(asio::io_service &io_service, request_handler &handler)
Construct a connection with the given io_service.
Definition: connection.cpp:19
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
Provides stream-oriented socket functionality.
asio::ip::tcp::socket & socket()
Get the socket associated with the connection.
Definition: connection.cpp:26
boost::shared_ptr< connection > connection_ptr
Definition: connection.hpp:70
Parser for incoming requests.
Represents a single connection from a client.
Definition: connection.hpp:28
Class to represent an error code value.
Definition: error_code.hpp:80
void start()
Start the first asynchronous operation for the connection.
Definition: connection.cpp:31
A reply to be sent to a client.
Definition: reply.hpp:23