#include "telnet_connection.h" #include telnet::Connection::Connection(boost::asio::io_service& io_service) : socket(io_service) { } void telnet::Connection::handle_read(const boost::system::error_code& error, size_t bytes_transferred) { boost::asio::write(socket, buf); } void telnet::Connection::start() { boost::asio::async_read_until(socket, buf, "\n", boost::bind(&Connection::handle_read, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); }