mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
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:
@ -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 ();
|
||||
|
Reference in New Issue
Block a user