178 gROOT->GetListOfSockets()->Add(
this);
207 for (
int i = 0; i <
fSize; i++) {
220 gROOT->GetListOfSockets()->Add(
this);
258 for (
int i = 0; i <
fSize; i++) {
268 gROOT->GetListOfSockets()->Remove(
this);
304 Warning(
"Init",
"%p: problems sending (0,0)", sock);
307 Warning(
"Init",
"problems sending (0,0)");
324 Warning(
"Init",
"%p: problems sending size", sock);
327 Warning(
"Init",
"problems sending size");
333 for (i = 0; i <
fSize; i++) {
358 for (i = 0; i <
fSize; i++) {
412 Error(
"Send",
"cannot send a message used for reading");
430 char *mbuf = mess.
Buffer();
451 if (strncmp(buf,
"ok", 2)) {
452 Error(
"Send",
"bad acknowledgement");
492 for (i = 0; i < nsocks; i++) {
502 for (
int is = 0; is < nsocks; is++) {
564 if (len > (std::numeric_limits<
decltype(len)>::max() -
sizeof(
decltype(len)))) {
565 Error(
"Recv",
"Buffer length is %u and %u+sizeof(UInt_t) cannot be represented as an UInt_t.", len, len);
569 char *buf =
new char[len+
sizeof(
UInt_t)];
587 char ok[2] = {
'o',
'k' };
631 for (i = 0; i < nsocks; i++) {
643 for (
int is = 0; is < nsocks; is++) {
684 for (
int i = 0; i <
fSize; i++)
698 for (
int i = 0; i <
fSize; i++)
UShort_t net2host(UShort_t x)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
const char Option_t
Option string (const char).
externTVirtualMutex * gROOTMutex
char * Compress(const char *str)
Remove all blanks from the string str.
#define R__LOCKGUARD(mutex)
This class represents an Internet Protocol (IP) address.
void SetLength() const
Set the message length at the beginning of the message buffer.
char * CompBuffer() const
Int_t GetCompressionLevel() const
void SetWhat(UInt_t what)
Using this method one can change the message type a-posteriori In case you OR "what" with kMESS_ACK,...
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Int_t Send(const TMessage &mess) override
Send a TMessage object.
Int_t Recv(TMessage *&mess) override
Receive a TMessage object.
TPSocket(TSocket *pSockets[], Int_t size)
Create a parallel socket. This ctor is called by TPServerSocket.
void Close(Option_t *opt="") override
Close a parallel socket.
virtual ~TPSocket()
Cleanup the parallel socket.
void Init(Int_t tcpwindowsize, TSocket *sock=nullptr)
Create a parallel socket to the specified host.
Int_t GetErrorCode() const
Returns error code.
Int_t SetOption(ESockOptions opt, Int_t val) override
Set socket options.
TInetAddress GetLocalInetAddress() override
Return internet address of local host to which the socket is bound.
Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault) override
Send a raw buffer of specified length.
Option_t * GetOption() const override
Int_t GetDescriptor() const override
Return socket descriptor.
Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault) override
Send a raw buffer of specified length.
Bool_t IsValid() const override
Int_t GetLocalPort() override
Get port # to which server socket is bound. In case of error returns -1.
virtual TSocket * Accept(UChar_t opt=0)
Accept a connection on a server socket.
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
friend class TServerSocket
Int_t GetErrorCode() const
Returns error code.
UInt_t GetBytesRecv() const
void SendStreamerInfos(const TMessage &mess)
Check if TStreamerInfo must be sent.
const char * GetService() const
Bool_t RecvStreamerInfos(TMessage *mess)
Receive a message containing streamer infos.
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
Int_t GetRemoteProtocol() const
UInt_t GetBytesSent() const
TInetAddress fLocalAddress
Int_t GetTcpWindowSize() const
virtual void Close(Option_t *opt="")
Close the socket.
Bool_t RecvProcessIDs(TMessage *mess)
Receive a message containing process ids.
TInetAddress GetInetAddress() const
Int_t GetCompressionLevel() const
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
void SendProcessIDs(const TMessage &mess)
Check if TProcessIDs must be sent.
virtual TInetAddress GetLocalInetAddress()
Return internet address of local host to which the socket is bound.
Option_t * GetOption() const override
virtual Int_t GetDescriptor() const
Int_t GetCompressionSettings() const
Int_t GetServType() const
void SetCompressionSettings(Int_t settings=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault)
Used to specify the compression level and algorithm: settings = 100 * algorithm + level.
virtual Bool_t IsValid() const
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.