1 #ifndef __AIRINV_SVR_CONNECTION_HPP 2 #define __AIRINV_SVR_CONNECTION_HPP 9 #include <boost/asio.hpp> 10 #include <boost/array.hpp> 11 #include <boost/noncopyable.hpp> 12 #include <boost/shared_ptr.hpp> 13 #include <boost/enable_shared_from_this.hpp> 25 class Connection :
public boost::enable_shared_from_this<Connection>,
26 private boost::noncopyable {
36 boost::asio::ip::tcp::socket&
socket();
44 void handleRead (
const boost::system::error_code& e,
45 std::size_t bytes_transferred);
48 void handleWrite (
const boost::system::error_code& e);
52 boost::asio::io_service::strand _strand;
55 boost::asio::ip::tcp::socket _socket;
61 boost::array<char, 8192> _buffer;
74 #endif // __AIRINV_SVR_CONNECTION_HPP
boost::asio::ip::tcp::socket & socket()
boost::shared_ptr< Connection > ConnectionShrPtr_T
The common handler for all incoming requests.
Connection(boost::asio::io_service &, RequestHandler &)