diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-07 17:50:30 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-08-07 17:50:30 +0200 |
commit | 8fd1eaa255ff71e325eded82740e0942494f7264 (patch) | |
tree | ae793b1754cd82e98442a3a8b99174f93cb8acb2 /modules/io_codec/examples/peer_echo_server.cpp | |
parent | 03ed2a0fe01704f9c34b44e0963da82f894d8968 (diff) |
wip debug
Diffstat (limited to 'modules/io_codec/examples/peer_echo_server.cpp')
-rw-r--r-- | modules/io_codec/examples/peer_echo_server.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/io_codec/examples/peer_echo_server.cpp b/modules/io_codec/examples/peer_echo_server.cpp index a949ff5..279db92 100644 --- a/modules/io_codec/examples/peer_echo_server.cpp +++ b/modules/io_codec/examples/peer_echo_server.cpp @@ -58,16 +58,18 @@ int main(){ auto echo_stream = saw::heap<saw::async_io_stream>(std::move(client)); auto echo_peer_stream_p = saw::new_streaming_io_peer<sch::Echo, sch::Echo, trans::FixedLength<8u>, encode::KelSimple, ring_buffer>(std::move(echo_stream)); + std::cout<<"Got client"<<std::endl; - echo_peer_stream_p.second.then([&](auto simp_resp) -> error_or<void>{ + echo_peer_stream_p.second.then([&](auto simp_resp) -> error_or<void> { + std::cout<<"Request\n"; data<sch::Echo> nat_resp; { auto eov = simple_codec.decode(simp_resp, nat_resp); if(eov.is_error()){ + std::cerr<<"Failed to decode"<<std::endl; return eov; } } - std::cout<<"Request:\n"; for(uint64_t i = 0u; i < nat_resp.size(); ++i){ std::cout<<nat_resp.at(i); } |