#ifndef ECHO_SESSION_INCLUDED
#define ECHO_SESSION_INCLUDED

#include <boost/asio.hpp>
namespace sockets {
    
    class echo_session {
    public:
        echo_session(
            boost::asio::io_service& io_service
        );
        boost::asio::ip::tcp::socket& get_socket(
        );
        void start(
        );
    protected:
        void handle_write(
            boost::system::error_code const& error
        );
        void handle_read(
            std::size_t received,
            boost::system::error_code const& error
        );
    private:
        boost::asio::ip::tcp::socket socket;
        enum {
            max_input = 1024
        };
        char input[
            max_input
        ];
    };
}

#endif
