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() { ...@@ -75,7 +75,7 @@ uint16_t run_server() {
for (;;) { for (;;) {
try { try {
io::typed_publish(ref, port, "127.0.0.1"); io::typed_publish(ref, port, "127.0.0.1");
CAF_LOGF_DEBUG("running on port " << port); CAF_PRINT("running on port " << port);
return port; return port;
} }
catch (bind_failure&) { catch (bind_failure&) {
...@@ -88,11 +88,15 @@ uint16_t run_server() { ...@@ -88,11 +88,15 @@ uint16_t run_server() {
int main(int argc, char** argv) { int main(int argc, char** argv) {
announce<ping>(&ping::value); announce<ping>(&ping::value);
announce<pong>(&pong::value); announce<pong>(&pong::value);
message_builder { argv + 1, argv + argc } message_builder{argv + 1, argv + argc}.apply({
.apply({on("-c", spro<uint16_t>)>> [](uint16_t port) { on("-c", spro<uint16_t>)>> [](uint16_t port) {
CAF_PRINT("run in client mode");
run_client("localhost", port); run_client("localhost", port);
}, },
on("-s") >> [] { run_server(); }, on() >> [&] { on("-s") >> [] {
run_server();
},
on() >> [&] {
auto port = run_server(); auto port = run_server();
CAF_CHECKPOINT(); CAF_CHECKPOINT();
ostringstream oss; ostringstream oss;
...@@ -109,7 +113,8 @@ int main(int argc, char** argv) { ...@@ -109,7 +113,8 @@ int main(int argc, char** argv) {
}); });
CAF_CHECKPOINT(); CAF_CHECKPOINT();
child.join(); child.join();
}}); }
});
CAF_CHECKPOINT(); CAF_CHECKPOINT();
await_all_actors_done(); await_all_actors_done();
shutdown(); 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