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
00016 friend class TransceiverSocket;
00017 public:
00018 TransmitterSocket(const std::string &IPAddress, unsigned int port=0);
00019 virtual ~TransmitterSocket(void);
00020
00021 int send(Socket& toSocket, const std::string& buffer, bool verbose=false);
00022 int send(Socket& toSocket, const std::vector<uint32_t>& buffer, bool verbose=false);
00023 int send(Socket& toSocket, const std::vector<uint16_t>& buffer, bool verbose=false);
00024
00025 protected:
00026 TransmitterSocket(void);
00027
00028 private:
00029 std::mutex sendMutex_;
00030
00031
00032 };
00033
00034 }
00035
00036 #endif