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, bool verbose=true);
00020 int send(Socket& toSocket, const std::vector<uint32_t>& buffer, bool verbose=true);
00021 int send(Socket& toSocket, const std::vector<uint16_t>& buffer, bool verbose=true);
00022
00023 protected:
00024 TransmitterSocket(void);
00025
00026 private:
00027 std::mutex sendMutex_;
00028
00029
00030 };
00031
00032 }
00033
00034 #endif