1931ab8fe8905c90520db54629b4b2aac3a995f7
[libt2n] / example-codegen / server.cpp
1 #include <socket_server.hxx>
2 #include <command_server.hxx>
3
4 #include "server.hxx"
5
6 using namespace libt2n;
7
8 bool t3(const Foo &foo)
9 {
10     return (foo.i==foo.j);
11 }
12
13
14 int main(int argc, char** argv) {
15   socket_server ss("./socket");
16   socket_server ss_other("./socket_other");
17   group_command_server<cmd_group_default> cs(ss);
18   group_command_server<cmd_group_other> cs_other(ss_other);
19
20   // handle requests
21   while(true) {
22     cs.handle(1000);
23     cs_other.handle(1000);
24   }
25
26   return 0;
27 }