Commit e211c2aa authored by Dominik Charousset's avatar Dominik Charousset

Fix formatting of test_typed_remote_actor

parent 0c1bb6bd
......@@ -75,7 +75,7 @@ uint16_t run_server() {
for (;;) {
try {
io::typed_publish(ref, port, "127.0.0.1");
CAF_LOGF_DEBUG("running on port " << port);
CAF_PRINT("running on port " << port);
return port;
}
catch (bind_failure&) {
......@@ -88,11 +88,15 @@ uint16_t run_server() {
int main(int argc, char** argv) {
announce<ping>(&ping::value);
announce<pong>(&pong::value);
message_builder { argv + 1, argv + argc }
.apply({on("-c", spro<uint16_t>)>> [](uint16_t port) {
message_builder{argv + 1, argv + argc}.apply({
on("-c", spro<uint16_t>)>> [](uint16_t port) {
CAF_PRINT("run in client mode");
run_client("localhost", port);
},
on("-s") >> [] { run_server(); }, on() >> [&] {
on("-s") >> [] {
run_server();
},
on() >> [&] {
auto port = run_server();
CAF_CHECKPOINT();
ostringstream oss;
......@@ -109,7 +113,8 @@ int main(int argc, char** argv) {
});
CAF_CHECKPOINT();
child.join();
}});
}
});
CAF_CHECKPOINT();
await_all_actors_done();
shutdown();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment