19 #ifndef _SERVER_CONNECTION_HPP
20 #define _SERVER_CONNECTION_HPP
26 #include <boost/asio.hpp>
27 #include <boost/array.hpp>
28 #include <boost/noncopyable.hpp>
29 #include <boost/shared_ptr.hpp>
30 #include <boost/enable_shared_from_this.hpp>
31 #include <boost/asio/basic_streambuf.hpp>
41 class Connection :
public boost::enable_shared_from_this<Connection>,
42 private boost::noncopyable
49 boost::asio::ip::tcp::socket&
socket();
54 bool allowedIpAddress(
const std::string &ip_address);
55 bool allowedClient ();
57 boost::asio::ip::tcp::socket socket_;
59 boost::asio::streambuf incomming_stream_buffer_;
60 boost::asio::streambuf outgoing_stream_buffer_;
Definition: request_router.hpp:43
void start()
Definition: connection.cpp:39
boost::shared_ptr< Connection > ConnectionPtr
Definition: connection.hpp:65
boost::property_tree::ptree BoostPtree
Definition: boost_ptree.hpp:31
Connection(boost::asio::io_service &io_service, RequestRouter &handler)
Definition: connection.cpp:24
boost::asio::ip::tcp::socket & socket()
Definition: connection.cpp:32
~Connection()
Definition: connection.hpp:47
Definition: connection.hpp:41