00001 #ifndef _ots_TransmitterSocket_h_
00002 #define _ots_TransmitterSocket_h_
00003
00004 #include "otsdaq-core/NetworkUtilities/Socket.h"
00005
00006 #include <string>
00007 #include <vector>
00008 #include <mutex>
00009
00010 namespace ots
00011 {
00012
00013 class TransmitterSocket : public virtual Socket
00014 {
00015 public:
00016 TransmitterSocket(const std::string &IPAddress, unsigned int port=0);
00017 virtual ~TransmitterSocket(void);
00018
00019 int send(Socket& toSocket, const std::string& buffer);
00020 int send(Socket& toSocket, const std::vector<uint32_t>& buffer);
00021
00022 protected:
00023 TransmitterSocket(void);
00024
00025 private:
00026 std::mutex sendMutex_;
00027
00028
00029 };
00030
00031 }
00032
00033 #endif