1 #ifndef _ots_TCPTransmitterSocket_h_
2 #define _ots_TCPTransmitterSocket_h_
7 #include "otsdaq/NetworkUtilities/TCPSocket.h"
20 void send(
char const* buffer, std::size_t size);
21 void send(
const std::string& buffer);
22 void send(
const std::vector<char>& buffer);
23 void send(
const std::vector<uint16_t>& buffer);
26 void send(
const std::vector<T>& buffer)
28 if(buffer.size() == 0)
30 std::cout << __PRETTY_FUNCTION__ <<
"I am sorry but I won't send an empty packet!" << std::endl;
33 send(reinterpret_cast<const char*>(&buffer.at(0)), buffer.size() *
sizeof(T));
36 void sendPacket(
char const* buffer, std::size_t size);
37 void sendPacket(
const std::string& buffer);
38 void setSendTimeout(
unsigned int timeoutSeconds,
unsigned int timeoutMicroSeconds);