makng the zmq work without external flag

This commit is contained in:
Dhanya Maliakal 2017-11-27 17:06:27 +01:00
commit 4466213882
3 changed files with 14 additions and 34 deletions

View File

@ -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:
/**

View File

@ -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
*/

View File

@ -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)