41 #include <Base/Common/W32Compat.hh>
42 #include <NetworkComm/CScommClient.hh>
47 int main (
int argc,
char* argv[])
50 cout<<
"usage:"<<argv[0]<<
" serverName"<<endl;
57 client.SetName(
string(
"exampleClient"));
59 client.SetVerbose(
true);
63 string msg=
"RPOSHEAD";
69 cout<<
"Connection returned:"<<
70 client.ConnectServer(
string(argv[1]))<<endl;
74 floats.push_back(0.1f);
75 floats.push_back(0.2f);
80 client.SendMsg(msg,ints);
82 floats.push_back(0.4f);
86 std::vector<char> binData;
88 bool endlessLoop=
true;
94 client.SendMsg(msg,ints);
95 if (client.GetData(msg, floats)==0) {
96 cout<<
"New Data from server:"<<endl;
97 for (
unsigned int i=0;i<floats.size();i++)
101 if (client.GetData(
"BINDATA", binData)==0) {
102 cout<<
"New binary Data from server:"<<endl;
103 for (
unsigned int i=0;i<binData.size();i++)
class for sending/receiving data between clients and servers