diff options
Diffstat (limited to 'modules/io_codec/c++')
-rw-r--r-- | modules/io_codec/c++/io_peer.tmpl.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/io_codec/c++/io_peer.tmpl.hpp b/modules/io_codec/c++/io_peer.tmpl.hpp index 4deabd3..faf8c7b 100644 --- a/modules/io_codec/c++/io_peer.tmpl.hpp +++ b/modules/io_codec/c++/io_peer.tmpl.hpp @@ -91,7 +91,17 @@ error_or<void> streaming_io_peer<Incoming, Outgoing, TransportEncoding, ContentE msg) { bool restart_write = (out_buffer_.read_segment_length() == 0u); - auto eov = out_buffer_.write_from(msg.get_buffer()); + auto& msg_buff = msg.get_buffer(); + { + auto eov = in_codec_.wrap(out_buffer_, msg_buff); + if(eov.is_error()){ + auto& err = eov.get_error(); + return std::move(err); + } + // auto& len_val = eov.get_value(); + } + + auto eov = out_buffer_.write_from(msg_buff); if (eov.is_error()) { auto& err = eov.get_error(); return std::move(err); |