1 2 3 4 5 6 7 8 9 10 11 12 13
#include <rpc/server.h> #include <rpc/this_server.h> #include <hwd/internal.h> int main(int, char **) { rpc::server server(hwd::internal::default_port); server.bind("stop_server", []{ rpc::this_server().stop(); }); server.run(); }