diff --git a/slsReceiverSoftware/include/UDPStandardImplementation.h b/slsReceiverSoftware/include/UDPStandardImplementation.h index 6a6feebe5..99e7c7cb5 100644 --- a/slsReceiverSoftware/include/UDPStandardImplementation.h +++ b/slsReceiverSoftware/include/UDPStandardImplementation.h @@ -184,19 +184,6 @@ class UDPStandardImplementation: private virtual slsReceiverDefs, public UDPBase */ void closeFiles(); - /** - * Set streaming port and restart sockets if streaming was enabled - * @param i streaming port - */ - void setStreamingPort(const uint32_t i); - - /** - * Set streaming source ip and restart sockets if streaming was enabled - * @param c streaming source ip - */ - void setStreamingSourceIP(const char* c); - - private: /** diff --git a/slsReceiverSoftware/include/ZmqSocket.h b/slsReceiverSoftware/include/ZmqSocket.h index 254c66ada..46b93c313 100644 --- a/slsReceiverSoftware/include/ZmqSocket.h +++ b/slsReceiverSoftware/include/ZmqSocket.h @@ -173,6 +173,20 @@ public: void* GetsocketDescriptor () { return socketDescriptor; }; + /** + * Connect client socket to server socket + * @returns 1 for fail, 0 for success + */ + int Connect() { + if (zmq_connect(socketDescriptor, serverAddress) < 0) { + PrintError (); + Close (); + return 1; + } + return 0; + } + + /** * Unbinds the Socket */ diff --git a/slsReceiverSoftware/src/UDPStandardImplementation.cpp b/slsReceiverSoftware/src/UDPStandardImplementation.cpp index a3fa3cc76..3aa6d422b 100644 --- a/slsReceiverSoftware/src/UDPStandardImplementation.cpp +++ b/slsReceiverSoftware/src/UDPStandardImplementation.cpp @@ -600,27 +600,6 @@ void UDPStandardImplementation::closeFiles() { } -void UDPStandardImplementation::setStreamingPort(const uint32_t i) { - streamingPort = i; - - FILE_LOG(logINFO) << "Streaming Port: " << streamingPort; - if (dataStreamEnable) { - setDataStreamEnable(false); - setDataStreamEnable(true); - } -} - -void UDPStandardImplementation::setStreamingSourceIP(const char c[]){ - strcpy(streamingSrcIP, c); - FILE_LOG(logINFO) << "Streaming Source IP: " << streamingSrcIP; - if (dataStreamEnable) { - setDataStreamEnable(false); - setDataStreamEnable(true); - } -} - - - void UDPStandardImplementation::SetLocalNetworkParameters() { //to increase socket receiver buffer size and max length of input queue by changing kernel settings if (myDetectorType == EIGER)