#ifndef TELNET_CONNECTION_H #define TELNET_CONNECTION_H #include #include #include #include using boost::asio::ip::tcp; namespace telnet { class Connection : public boost::enable_shared_from_this { friend class Server; private: Connection(boost::asio::io_service& io_service); void handle_read(const boost::system::error_code& error, size_t bytes_transferred); bool parse_args(std::string& line, std::vector& args); tcp::socket socket; boost::asio::streambuf buf; public: typedef boost::shared_ptr p; void start(); }; }; #endif