added test using own class as argument
[libt2n] / example-codegen / server.cpp
index aa8af26..1931ab8 100644 (file)
@@ -5,13 +5,23 @@
 
 using namespace libt2n;
 
+bool t3(const Foo &foo)
+{
+    return (foo.i==foo.j);
+}
+
+
 int main(int argc, char** argv) {
   socket_server ss("./socket");
+  socket_server ss_other("./socket_other");
   group_command_server<cmd_group_default> cs(ss);
+  group_command_server<cmd_group_other> cs_other(ss_other);
 
-  // handle requests (without timeout)
-  while(true)
-    cs.handle();
+  // handle requests
+  while(true) {
+    cs.handle(1000);
+    cs_other.handle(1000);
+  }
 
   return 0;
 }