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