1 #ifndef _ots_ReceiverSocket_h_
2 #define _ots_ReceiverSocket_h_
4 #include "otsdaq-core/NetworkUtilities/Socket.h"
22 int receive(std::string& buffer,
23 unsigned int timeoutSeconds = 1,
24 unsigned int timeoutUSeconds = 0,
25 bool verbose =
false);
26 int receive(std::vector<uint32_t>& buffer,
27 unsigned int timeoutSeconds = 1,
28 unsigned int timeoutUSeconds = 0,
29 bool verbose =
false);
30 int receive(std::string& buffer,
31 unsigned long& fromIPAddress,
32 unsigned short& fromPort,
33 unsigned int timeoutSeconds = 1,
34 unsigned int timeoutUSeconds = 0,
35 bool verbose =
false);
36 int receive(std::vector<uint32_t>& buffer,
37 unsigned long& fromIPAddress,
38 unsigned short& fromPort,
39 unsigned int timeoutSeconds = 1,
40 unsigned int timeoutUSeconds = 0,
41 bool verbose =
false);
47 fd_set fileDescriptor_;
48 struct timeval timeout_;
49 struct sockaddr_in fromAddress_;
50 socklen_t addressLength_;
53 unsigned long dummyIPAddress_;
54 unsigned short dummyPort_;
55 unsigned int readCounter_;