| 356 | } |
| 357 | |
| 358 | int caf_main(actor_system& sys, const config& cfg) { |
| 359 | signal(SIGTERM, set_shutdown_flag); |
| 360 | signal(SIGINT, set_shutdown_flag); |
| 361 | if (cfg.server) |
| 362 | return server(sys, cfg.mode, cfg.port); |
| 363 | else |
| 364 | return client(sys, cfg.mode, cfg.host, cfg.port); |
| 365 | } |
| 366 | |
| 367 | CAF_MAIN(caf::id_block::io_test, caf::io::middleman) |