1 #ifndef _ots_ReceiverSocket_h_
2 #define _ots_ReceiverSocket_h_
4 #include "otsdaq-core/NetworkUtilities/Socket.h"
19 int receive(std::string& buffer,
unsigned int timeoutSeconds=1,
unsigned int timeoutUSeconds=0,
bool verbose=
true);
20 int receive(std::vector<uint32_t>& buffer,
unsigned int timeoutSeconds=1,
unsigned int timeoutUSeconds=0,
bool verbose=
true);
21 int receive(std::string& buffer,
unsigned long& fromIPAddress,
unsigned short& fromPort,
unsigned int timeoutSeconds=1,
unsigned int timeoutUSeconds=0,
bool verbose=
true);
22 int receive(std::vector<uint32_t>& buffer,
unsigned long& fromIPAddress,
unsigned short& fromPort,
unsigned int timeoutSeconds=1,
unsigned int timeoutUSeconds=0,
bool verbose=
true);
28 fd_set fileDescriptor_;
29 struct timeval timeout_;
30 struct sockaddr_in fromAddress_;
31 socklen_t addressLength_;
34 unsigned long dummyIPAddress_;
35 unsigned short dummyPort_;
36 unsigned int readCounter_;
38 std::mutex receiveMutex_;