62 eol_matcher_(this->
cfg().end_of_line())
67 void async_read()
override
69 auto self(this->shared_from_this());
70 boost::asio::async_read_until(
72 [
this, self](
const boost::system::error_code& ec, std::size_t bytes_transferred) {
73 if (!ec && bytes_transferred > 0)
75 auto io_msg = std::make_shared<goby::middleware::protobuf::IOData>();
76 auto& bytes = *io_msg->mutable_data();
77 bytes = std::string(bytes_transferred, 0);
78 std::istream is(&buffer_);
79 is.read(&bytes[0], bytes_transferred);
92 match_regex eol_matcher_;
93 boost::asio::streambuf buffer_;
107 Config, ThreadType, use_indexed_groups>
110 subscribe_layer, Config, ThreadType, use_indexed_groups>;
116 void start_session(boost::asio::ip::tcp::socket tcp_socket)
118 std::make_shared<TCPSessionLineBased<Base>>(std::move(tcp_socket), *
this)->start();