Mercurial > hg > beaglert
diff projects/basic_network/render.cpp @ 25:98aed580452a bbb_network
- Network now actually works.
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 08 May 2015 17:48:58 +0100 |
parents | ad5cd8dd99b3 |
children | 4255ecbb9bec 3c3a1357657d |
line wrap: on
line diff
--- a/projects/basic_network/render.cpp Fri May 08 11:12:13 2015 +0100 +++ b/projects/basic_network/render.cpp Fri May 08 17:48:58 2015 +0100 @@ -19,11 +19,11 @@ AuxiliaryTask transmitReceiveDataTask; void transmitReceiveData(){ - printf("transmitAndReceiveData\n"); + printf("transmitReceiveData auxiliary task has started\n"); while(!gShouldStop){ - //sendMessage(networkObject); - //receiveMessage(networkObject); - usleep(10000); + sendMessage(networkObject); + receiveMessage(networkObject); + usleep(1000); } closeSockets(); } @@ -53,7 +53,7 @@ networkObject.variables[1]=&gPhase; networkObject.numVariables=2; setupSockets(settings->receivePort, settings->transmitPort, settings->serverName); - transmitReceiveDataTask=createAuxiliaryTaskLoop(*transmitReceiveData, 50, "transmit-receive-data"); + transmitReceiveDataTask=createAuxiliaryTaskLoop(*transmitReceiveData, 80, "transmit-receive-data"); //scheduleAuxiliaryTask(transmitReceiveDataTask); //here it does not work return true; }