75 :
TNamed(addr.GetHostName(), service),
fCompress(
ROOT::RCompressionSetting::EAlgorithm::kUseGlobal)
99 gROOT->GetListOfSockets()->Add(
this);
117 :
TNamed(addr.GetHostName(),
""),
fCompress(
ROOT::RCompressionSetting::EAlgorithm::kUseGlobal)
142 gROOT->GetListOfSockets()->Add(
this);
180 gROOT->GetListOfSockets()->Add(
this);
218 if (
fUrl.Contains(
"root"))
235 gROOT->GetListOfSockets()->Add(
this);
258 fName.Form(
"unix:%s", sockpath);
269 gROOT->GetListOfSockets()->Add(
this);
295 gROOT->GetListOfSockets()->Add(
this);
317 fName.Form(
"unix:%s", sockpath);
328 gROOT->GetListOfSockets()->Add(
this);
354 gROOT->GetListOfSockets()->Add(
this);
386 gROOT->GetListOfSockets()->Remove(
this);
440 rc =
gSystem->Select(&fh, timeout);
457 if ((nsent =
Send(mess)) < 0)
476 if ((nsent =
Send(mess)) < 0)
495 if ((nsent =
Send(mess)) < 0)
498 return nsent -
sizeof(
Int_t);
518 Error(
"Send",
"cannot send a message used for reading");
536 char *mbuf = mess.
Buffer();
570 if (strncmp(buf,
"ok", 2)) {
571 Error(
"Send",
"bad acknowledgement");
580 return nsent -
sizeof(
UInt_t);
597 if ((nsent =
Send(mess)) < 0)
617 if ((nsent =
gSystem->SendRaw(
fSocket, buffer, length, (
int) opt)) <= 0) {
650 minilist =
new TList();
652 Info(
"SendStreamerInfos",
"sending TStreamerInfo: %s, version = %d",
662 if (
Send(messinfo) < 0)
663 Warning(
"SendStreamerInfos",
"problems sending TStreamerInfo's ...");
680 for (
Int_t ipid = 0; ipid < npids; ipid++) {
695 minilist =
new TList();
697 Info(
"SendProcessIDs",
"sending TProcessID: %s", pid->
GetTitle());
704 if (
Send(messpid) < 0)
705 Warning(
"SendProcessIDs",
"problems sending TProcessID's ...");
722 if ((
n =
Recv(str, max, kind)) <= 0) {
731 Error(
"Recv",
"got message of wrong kind (expected %d, got %d)",
751 if ((
n =
Recv(mess)) <= 0) {
784 if ((
n =
Recv(mess)) <= 0) {
821 if (
n == 0 ||
n == -5) {
830 if (len > (std::numeric_limits<
decltype(len)>::max() -
sizeof(
decltype(len)))) {
831 Error(
"Recv",
"Buffer length is %u and %u+sizeof(UInt_t) cannot be represented as an UInt_t.", len, len);
836 char *buf =
new char[len+
sizeof(
UInt_t)];
838 if (
n == 0 ||
n == -5) {
855 if (streamerInfoReceived) {
862 if (processIdReceived) {
872 const char ok[2] = {
'o',
'k' };
907 if (length == 0)
return 0;
912 if (
n == 0 ||
n == -5) {
943 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
947 Info(
"RecvStreamerInfos",
"importing TStreamerInfo: %s, version = %d",
953 lnk = list->FirstLink();
957 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
961 Info(
"RecvStreamerInfos",
"importing TStreamerInfo: %s, version = %d",
988 TIter nextpid(pidslist);
999 Info(
"RecvProcessIDs",
"importing TProcessID: %s", pid->
GetTitle());
1066 if (level < 0) level = 0;
1067 if (level > 99) level = 99;
UShort_t net2host(UShort_t x)
R__EXTERN const char * gRootdErrStr[]
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
bool Bool_t
Boolean (0=false, 1=true) (bool).
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
const char Option_t
Option string (const char).
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
char * Compress(const char *str)
Remove all blanks from the string str.
TObject * ReadObject(const TClass *cl) override
Read object from I/O buffer.
void WriteString(const char *s) override
Write string to I/O buffer.
char * ReadString(char *s, Int_t max) override
Read string from I/O buffer.
void WriteObject(const TObject *obj, Bool_t cacheReuse=kTRUE) override
Write object to I/O buffer.
virtual Int_t GetEntries() const
This class represents an Internet Protocol (IP) address.
const char * GetHostName() const
void Clear(Option_t *option="") override
Remove all objects from the list.
void Add(TObject *obj) override
void SetLength() const
Set the message length at the beginning of the message buffer.
Bool_t TestBitNumber(UInt_t bitnumber) const
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.
Int_t IndexOf(const TObject *obj) const override
Int_t GetEntries() const override
Return the number of objects in array (i.e.
TObject * At(Int_t idx) const override
TObject * UncheckedAt(Int_t i) const
void Add(TObject *obj) override
Wrapper around a TObject so it can be stored in a TList.
TObject * GetObject() const
Collectable string class.
virtual const char * GetName() const
Returns name of object.
virtual UInt_t GetUniqueID() const
Return the unique object id.
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.
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
TObject()
TObject constructor.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
A TProcessID identifies a ROOT job in a unique way in time and space.
Int_t IncrementCount()
Increase the reference count to this object.
static TObjArray * GetPIDs()
static: returns array of TProcessIDs
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
Int_t GetErrorCode() const
Returns error code.
TVirtualMutex * fLastUsageMtx
void SetCompressionLevel(Int_t level=ROOT::RCompressionSetting::ELevel::kUseMin)
See comments for function SetCompressionSettings.
void SendStreamerInfos(const TMessage &mess)
Check if TStreamerInfo must be sent.
void SetCompressionAlgorithm(Int_t algorithm=ROOT::RCompressionSetting::EAlgorithm::kUseGlobal)
See comments for function SetCompressionSettings.
static ULong64_t GetSocketBytesSent()
Get total number of bytes sent via all sockets.
Bool_t RecvStreamerInfos(TMessage *mess)
Receive a message containing streamer infos.
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
static Int_t GetClientProtocol()
Static method returning supported client protocol.
TInetAddress fLocalAddress
static ULong64_t fgBytesRecv
virtual void Close(Option_t *opt="")
Close the socket.
void MarkBrokenConnection()
Close the socket and mark as due to a broken connection.
Bool_t RecvProcessIDs(TMessage *mess)
Receive a message containing process ids.
Int_t GetCompressionLevel() const
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
static ULong64_t fgBytesSent
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.
static Int_t fgClientProtocol
virtual TInetAddress GetLocalInetAddress()
Return internet address of local host to which the socket is bound.
virtual Int_t Select(Int_t interest=kRead, Long_t timeout=-1)
Waits for this socket to change status.
virtual Int_t GetLocalPort()
Return the local port # to which the socket is bound.
Option_t * GetOption() const override
static void NetError(const char *where, Int_t error)
Print error string depending on error code.
virtual Int_t SendObject(const TObject *obj, Int_t kind=kMESS_OBJECT)
Send an object.
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.
static ULong64_t GetSocketBytesRecv()
Get total number of bytes received via all sockets.
Describes a persistent version of a class.
Int_t GetClassVersion() const override
Int_t GetNumber() const override
TObjArray * GetElements() const override
void BuildCheck(TFile *file=nullptr, Bool_t load=kTRUE) override
Check if built and consistent with the class dictionary.
static void ResetErrno()
Static function resetting system error number.
This class represents a WWW compatible URL.
@ kUndefined
Undefined compression algorithm (must be kept the last of the list in case a new algorithm is added).
@ kUseMin
Compression level reserved when we are not sure what to use (1 is for the fastest compression).