Printing thread Ids created and exited, others (if others) are zmqs internal threading, moved all zmq socket type to publish subscriber type: (non blocking in send if no client) as per Aldos gui and probably faster, as only clients to receiver standard impl is aldos gui/slsDetectorGui/xiaoqiangs call back via detector class

This commit is contained in:
Dhanya Maliakal
2017-08-24 16:06:00 +02:00
parent 960dc5c62f
commit 2d52058a55
6 changed files with 28 additions and 14 deletions

View File

@ -63,13 +63,18 @@ public:
return;
// create publisher
socketDescriptor = zmq_socket (contextDescriptor, ZMQ_PULL);
socketDescriptor = zmq_socket (contextDescriptor, ZMQ_SUB);
if (socketDescriptor == NULL) {
PrintError ();
Close ();
}
//Socket Options provided above
// an empty string implies receiving any messages
if ( zmq_setsockopt(socketDescriptor, ZMQ_SUBSCRIBE, "", 0)) {
PrintError ();
Close();
}
//ZMQ_LINGER default is already -1 means no messages discarded. use this options if optimizing required
//ZMQ_SNDHWM default is 0 means no limit. use this to optimize if optimizing required
// eg. int value = -1;
@ -104,7 +109,7 @@ public:
if (contextDescriptor == NULL)
return;
// create publisher
socketDescriptor = zmq_socket (contextDescriptor, ZMQ_PUSH);
socketDescriptor = zmq_socket (contextDescriptor, ZMQ_PUB);
if (socketDescriptor == NULL) {
PrintError ();
Close ();