56 :
TNamed(addr.GetHostName(), service),
fCompress(
ROOT::RCompressionSetting::EAlgorithm::kUseGlobal)
80 gROOT->GetListOfSockets()->Add(
this);
99 :
TNamed(addr.GetHostName(),
""),
fCompress(
ROOT::RCompressionSetting::EAlgorithm::kUseGlobal)
124 gROOT->GetListOfSockets()->Add(
this);
162 gROOT->GetListOfSockets()->Add(
this);
183 if (
fUrl.Contains(
"root"))
200 gROOT->GetListOfSockets()->Add(
this);
223 fName.Form(
"unix:%s", sockpath);
234 gROOT->GetListOfSockets()->Add(
this);
260 gROOT->GetListOfSockets()->Add(
this);
282 fName.Form(
"unix:%s", sockpath);
293 gROOT->GetListOfSockets()->Add(
this);
319 gROOT->GetListOfSockets()->Add(
this);
336 gROOT->GetListOfSockets()->Remove(
this);
390 rc =
gSystem->Select(&fh, timeout);
407 if ((nsent =
Send(mess)) < 0)
426 if ((nsent =
Send(mess)) < 0)
445 if ((nsent =
Send(mess)) < 0)
448 return nsent -
sizeof(
Int_t);
468 Error(
"Send",
"cannot send a message used for reading");
486 char *mbuf = mess.
Buffer();
522 if (strncmp(buf,
"ok", 2)) {
523 Error(
"Send",
"bad acknowledgement");
532 return nsent -
sizeof(
UInt_t);
549 if ((nsent =
Send(mess)) < 0)
569 if ((nsent =
gSystem->SendRaw(
fSocket, buffer, length, (
int) opt)) <= 0) {
603 minilist =
new TList();
605 Info(
"SendStreamerInfos",
"sending TStreamerInfo: %s, version = %d",
615 if (
Send(messinfo) < 0)
616 Warning(
"SendStreamerInfos",
"problems sending TStreamerInfo's ...");
633 for (
Int_t ipid = 0; ipid < npids; ipid++) {
647 minilist =
new TList();
649 Info(
"SendProcessIDs",
"sending TProcessID: %s", pid->
GetTitle());
656 if (
Send(messpid) < 0)
657 Warning(
"SendProcessIDs",
"problems sending TProcessID's ...");
674 if ((
n =
Recv(str, max, kind)) <= 0) {
683 Error(
"Recv",
"got message of wrong kind (expected %d, got %d)",
703 if ((
n =
Recv(mess)) <= 0) {
736 if ((
n =
Recv(mess)) <= 0) {
773 if (
n == 0 ||
n == -5) {
783 if (len > (std::numeric_limits<
decltype(len)>::max() -
sizeof(
decltype(len)))) {
784 Error(
"Recv",
"Buffer length is %u and %u+sizeof(UInt_t) cannot be represented as an UInt_t.", len, len);
789 char *buf =
new char[len+
sizeof(
UInt_t)];
791 if (
n == 0 ||
n == -5) {
816 char ok[2] = {
'o',
'k' };
852 if (length == 0)
return 0;
857 if (
n == 0 ||
n == -5) {
889 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
893 Info(
"RecvStreamerInfos",
"importing TStreamerInfo: %s, version = %d",
899 lnk = list->FirstLink();
903 Bool_t isstl = element && strcmp(
"This",element->
GetName())==0;
907 Info(
"RecvStreamerInfos",
"importing TStreamerInfo: %s, version = %d",
934 TIter nextpid(pidslist);
945 Info(
"RecvProcessIDs",
"importing TProcessID: %s", pid->
GetTitle());
1013 if (level < 0) level = 0;
1014 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.
externTVirtualMutex * gROOTMutex
char * Compress(const char *str)
Remove all blanks from the string str.
#define R__LOCKGUARD(mutex)
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
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.
void SetCompressionSettings(Int_t settings=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault)
Used to specify the compression level and algorithm: settings = 100 * algorithm + level.
Int_t GetErrorCode() const
Returns error code.
Bool_t RecvStreamerInfos(TMessage *mess)
Receive a message containing streamer infos.
virtual TInetAddress GetLocalInetAddress()
Return internet address of local host to which the socket is bound.
TInetAddress fLocalAddress
void SetCompressionLevel(Int_t level=ROOT::RCompressionSetting::ELevel::kUseMin)
See comments for function SetCompressionSettings.
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
TVirtualMutex * fLastUsageMtx
virtual Int_t GetLocalPort()
Return the local port # to which the socket is bound.
static ULong64_t fgBytesRecv
Bool_t RecvProcessIDs(TMessage *mess)
Receive a message containing process ids.
virtual Bool_t IsValid() const
static void NetError(const char *where, Int_t error)
Print error string depending on error code.
void SetCompressionAlgorithm(Int_t algorithm=ROOT::RCompressionSetting::EAlgorithm::kUseGlobal)
See comments for function SetCompressionSettings.
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
virtual void Close(Option_t *opt="")
Close the socket.
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
static ULong64_t fgBytesSent
Int_t GetCompressionLevel() const
void SendStreamerInfos(const TMessage &mess)
Check if TStreamerInfo must be sent.
virtual Int_t SendObject(const TObject *obj, Int_t kind=kMESS_OBJECT)
Send an object.
static ULong64_t GetSocketBytesRecv()
Get total number of bytes received via all sockets.
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
Option_t * GetOption() const override
static ULong64_t GetSocketBytesSent()
Get total number of bytes sent via all sockets.
virtual Int_t Select(Int_t interest=kRead, Long_t timeout=-1)
Waits for this socket to change status.
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.
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).