summaryrefslogtreecommitdiff
path: root/modules/io_codec/examples
diff options
context:
space:
mode:
Diffstat (limited to 'modules/io_codec/examples')
-rw-r--r--modules/io_codec/examples/peer_echo_client.cpp6
-rw-r--r--modules/io_codec/examples/peer_echo_server.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/io_codec/examples/peer_echo_client.cpp b/modules/io_codec/examples/peer_echo_client.cpp
index 942deed..b610372 100644
--- a/modules/io_codec/examples/peer_echo_client.cpp
+++ b/modules/io_codec/examples/peer_echo_client.cpp
@@ -69,13 +69,13 @@ int main(int argc, char** argv){
codec<sch::Echo, encode::KelSimple> simple_codec;
- network.connect(*addr).then([&](saw::own<saw::io_stream> client){
+ network.connect(*addr).then([&](saw::own<saw::io_stream<saw::net::Os>> client){
if(!client){
return;
}
- 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));
+ auto echo_stream = saw::heap<saw::async_io_stream<saw::net::Os>>(std::move(client));
+ auto echo_peer_stream_p = saw::new_streaming_io_peer<sch::Echo, sch::Echo, trans::FixedLength<8u>, encode::KelSimple>(std::move(echo_stream));
std::cout<<"Connected"<<std::endl;
diff --git a/modules/io_codec/examples/peer_echo_server.cpp b/modules/io_codec/examples/peer_echo_server.cpp
index 4d201c0..804d9ad 100644
--- a/modules/io_codec/examples/peer_echo_server.cpp
+++ b/modules/io_codec/examples/peer_echo_server.cpp
@@ -50,13 +50,13 @@ int main(){
return -2;
}
- echo_srv->accept().then([&](saw::own<saw::io_stream> client){
+ echo_srv->accept().then([&](saw::own<saw::io_stream<saw::net::Os>> client){
if(!client){
keep_running = false;
return;
}
- 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));
+ auto echo_stream = saw::heap<saw::async_io_stream<saw::net::Os>>(std::move(client));
+ auto echo_peer_stream_p = saw::new_streaming_io_peer<sch::Echo, sch::Echo, trans::FixedLength<8u>, encode::KelSimple>(std::move(echo_stream));
std::cout<<"Connected client"<<std::endl;
auto peer_str = echo_peer_stream_p.first.get();