MCPcopy Create free account
hub / github.com/actor-framework/actor-framework / server

Function server

examples/remoting/remote_spawn.cpp:138–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136};
137
138void server(actor_system& sys, const config& cfg) {
139 const auto port = get_or(cfg, "port", default_port);
140 auto res = sys.middleman().open(port);
141 if (!res) {
142 sys.println("*** cannot open port: {}", to_string(res.error()));
143 return;
144 }
145 sys.println("*** running on port: {}", *res);
146 sys.println("*** press <enter> to shutdown server");
147 getchar();
148}
149
150// --(rst-client-begin)--
151void client(actor_system& sys, const config& cfg) {

Callers

nothing calls this directly

Calls 6

printlnMethod · 0.80
get_orFunction · 0.50
to_stringFunction · 0.50
openMethod · 0.45
middlemanMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected