diff options
author | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-05-21 12:13:10 +0200 |
---|---|---|
committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2024-05-21 12:13:10 +0200 |
commit | 875ce0328d1d919d639797972e4cf60c6715503f (patch) | |
tree | f4e91df4545578ca45861d2341a6e89109cca92c /modules/io/examples/echo_client.cpp | |
parent | af665edfa776fe27221ae357f356f428390b0a0d (diff) |
Fixing up echo builders and names
Diffstat (limited to 'modules/io/examples/echo_client.cpp')
-rw-r--r-- | modules/io/examples/echo_client.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/io/examples/echo_client.cpp b/modules/io/examples/echo_client.cpp index 53ebe54..4b95158 100644 --- a/modules/io/examples/echo_client.cpp +++ b/modules/io/examples/echo_client.cpp @@ -34,7 +34,7 @@ int main(){ std::array<uint8_t, 32> read_data; uint64_t read_bytes = 0; auto& network = aio.io->get_network(); - network.resolve_address("127.0.0.1", 4322).then([&](auto addr){ + network.resolve_address(saw::echo_address, saw::echo_port).then([&](auto addr){ net_addr = std::move(addr); network.connect(*net_addr).then([&](auto rmt_srv){ async_rmt = saw::heap<saw::async_io_stream>(std::move(rmt_srv)); @@ -43,6 +43,8 @@ int main(){ async_rmt->read(&read_data[0], 3, read_data.size()-1); async_rmt->read_done().then([&](size_t b){ + + std::cout<<"Received bytes:\n"<<std::endl; for(uint64_t i = 0; i < b; ++i){ std::cout<<static_cast<char>(read_data[i]); } |