56 char *rawbuf =
new char[
sizeof(
UInt_t)];
58 unsigned nBytes =
s->RecvRaw(rawbuf,
sizeof(
UInt_t));
71 s->RecvRaw(rawbuf, 8);
78 std::unique_ptr<TBufferFile> objBuf;
79 if (classBufSize != 0) {
80 char *classBuf =
new char[classBufSize];
81 s->RecvRaw(classBuf, classBufSize);
85 return std::make_pair(code, std::move(objBuf));
MPCodeBufPair MPRecv(TSocket *s)
Receive message from a socket.
int MPSend(TSocket *s, unsigned code)
Send a message with the specified code on the specified socket.
std::pair< unsigned, std::unique_ptr< TBufferFile > > MPCodeBufPair
An std::pair that wraps the code and optional object contained in a message.
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
void WriteUInt(UInt_t i) override
void WriteULong(ULong_t l) override
void ReadUInt(UInt_t &i) override
void ReadULong(ULong_t &l) override
void SetBuffer(void *buf, UInt_t bufsiz=0, Bool_t adopt=kTRUE, ReAllocCharFun_t reallocfunc=0)
Sets a new buffer in an existing TBuffer object.
@ kRecvError
Error while reading from the socket.
static constexpr double s