int main(int argc, char** argv)
{
libt2n::socket_client_connection sc("./socket");
+ libt2n::socket_client_connection sc_other("./socket_other");
cmd_group_default_client cc(sc);
+ cmd_group_other_client cc_other(sc_other);
bool throwok=false;
try
&& ( cc.testfunc("hello") == "hello, testfunc() was here" )
&& ( cc.testfunc_ref("hello") == "hello, testfunc() was here" )
&& ( cc.t2(10) == 10 )
- && ( cc.t3(10, 20, "hello", std::pair<int, float>(10,20)) ) )
+ && ( cc_other.t3(10, 20, "hello", std::pair<int, float>(10,20)) ) )
? EXIT_SUCCESS : EXIT_FAILURE;
}
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;
}
using namespace std;
-LIBT2N_EXPORT bool t3(int i, float f, const string &s, const pair<int, float> &p)
+LIBT2N_EXPORT_GROUP(other) bool t3(int i, float f, const string &s, const pair<int, float> &p)
{
return (i==p.first) && (f==p.second) && (s=="hello");
}