1 #ifndef _TCPReceiverSocket_h_
2 #define _TCPReceiverSocket_h_
5 #include "otsdaq/NetworkUtilities/TCPPacket.h"
6 #include "otsdaq/NetworkUtilities/TCPSocket.h"
22 buffer.resize(maxSocketSize);
23 int length = receive(static_cast<char*>(&buffer.at(0)), maxSocketSize);
26 buffer.resize(length);
31 std::string receivePacket();
32 void setReceiveTimeout(
unsigned int timeoutSeconds,
unsigned int timeoutMicroSeconds);
35 std::size_t receive(
char* buffer, std::size_t bufferSize = maxSocketSize,
int timeoutMicroSeconds = -1);
36 static constexpr
unsigned int maxSocketSize = 65536;