64 eol_matcher_(this->
cfg().end_of_line())
69 void async_read()
override
71 auto self(this->shared_from_this());
72 boost::asio::async_read_until(
74 [
this, self](
const boost::system::error_code& ec, std::size_t bytes_transferred)
76 if (!ec && bytes_transferred > 0)
78 auto io_msg = std::make_shared<goby::middleware::protobuf::IOData>();
79 auto& bytes = *io_msg->mutable_data();
80 bytes = std::string(bytes_transferred, 0);
81 std::istream is(&buffer_);
82 is.read(&bytes[0], bytes_transferred);
95 match_regex eol_matcher_;
96 boost::asio::streambuf buffer_;
109 Config, ThreadType, use_indexed_groups>
112 subscribe_layer, Config, ThreadType, use_indexed_groups>;
118 void start_session(boost::asio::ip::tcp::socket tcp_socket)
120 std::make_shared<TCPSessionLineBased<Base>>(std::move(tcp_socket), *
this)->start();