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