continue;
}
- /*socketMutex.lock();
+ socketMutex.lock();
char dat[1024];
- dat = communicationSocket.receiveData(1024);
+ int ret = communicationSocket->receiveData(dat, 1024);
// Never forget to release!
socketMutex.unlock();
// A packed arrived
- if (dat != null) {
+ if (ret != -1) {
receivedPacket(dat);
}
// Wait a bit as to not tie up system resources
this_thread::sleep_for (chrono::milliseconds(100));
- } catch (Exception e) {
-
- }*/
-
-
}
}