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