diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-07-24 11:09:55 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-07-24 11:09:55 +0200 |
commit | ea306799624d0390074f6afa5d38644cce076c9f (patch) | |
tree | 81563442aa083b8293f382017cf8d78984e527eb /modules/io_codec/examples | |
parent | 977ac8bce989285eaabc76c4ed8571ce5fd6793a (diff) |
wip
Diffstat (limited to 'modules/io_codec/examples')
-rw-r--r-- | modules/io_codec/examples/peer_echo_client.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/io_codec/examples/peer_echo_client.cpp b/modules/io_codec/examples/peer_echo_client.cpp index f1836e4..b09a51a 100644 --- a/modules/io_codec/examples/peer_echo_client.cpp +++ b/modules/io_codec/examples/peer_echo_client.cpp @@ -4,6 +4,8 @@ #include <iostream> +#include <forstio/codec/transport.hpp> + int main(){ using namespace saw; @@ -34,7 +36,7 @@ int main(){ network.connect(*addr).then([](saw::own<saw::io_stream> client){ 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, encode::KelSimple, ring_buffer>(std::move(echo_stream)); + auto echo_peer_stream_p = saw::new_streaming_io_peer<sch::Echo, sch::Echo, transport::FixedLength<8u>, encode::KelSimple, ring_buffer>(std::move(echo_stream)); echo_peer_stream_p.first->on_read_disconnected().attach(std::move(echo_peer_stream_p.first)).detach(); }).detach(); |