otsdaq  v2_00_00
UDPDataStreamerBase.h
1 #ifndef _ots_UDPDataStreamerBase_h_
2 #define _ots_UDPDataStreamerBase_h_
3 
4 #include "otsdaq-core/NetworkUtilities/TransmitterSocket.h" // Make sure this is always first because <sys/types.h> (defined in Socket.h) must be first
5 #include "otsdaq-core/NetworkUtilities/ReceiverSocket.h" // Make sure this is always first because <sys/types.h> (defined in Socket.h) must be first
6 #include <string>
7 
8 namespace ots
9 {
10 
12 {
13 public:
14  UDPDataStreamerBase(std::string IPAddress, unsigned int port, std::string toIPAddress, unsigned int toPort);
15  virtual ~UDPDataStreamerBase(void);
16 
17  int send(const std::string& buffer) { return TransmitterSocket::send(streamToSocket_,buffer); }
18  int send(const std::vector<uint32_t>& buffer) { return TransmitterSocket::send(streamToSocket_,buffer); }
19 
20 protected:
21  ReceiverSocket streamToSocket_;
22 };
23 
24 }
25 
26 #endif