78 :
TNamed(addr.GetHostName(), service)
106 gROOT->GetListOfSockets()->Add(
this);
124 :
TNamed(addr.GetHostName(),
"")
153 gROOT->GetListOfSockets()->Add(
this);
195 gROOT->GetListOfSockets()->Add(
this);
246 gROOT->GetListOfSockets()->Add(
this);
281 gROOT->GetListOfSockets()->Add(
this);
309 gROOT->GetListOfSockets()->Add(
this);
343 gROOT->GetListOfSockets()->Add(
this);
370 gROOT->GetListOfSockets()->Add(
this);
402 gROOT->GetListOfSockets()->Remove(
this);
473 if ((nsent =
Send(mess)) < 0)
492 if ((nsent =
Send(mess)) < 0)
511 if ((nsent =
Send(mess)) < 0)
514 return nsent -
sizeof(
Int_t);
534 Error(
"Send",
"cannot send a message used for reading");
547 const_cast<TMessage&>(mess).SetCompressionSettings(
fCompress);
550 const_cast<TMessage&>(mess).Compress();
552 char *mbuf = mess.
Buffer();
586 if (strncmp(buf,
"ok", 2)) {
587 Error(
"Send",
"bad acknowledgement");
596 return nsent -
sizeof(
UInt_t);
613 if ((nsent =
Send(mess)) < 0)
666 minilist =
new TList();
668 Info(
"SendStreamerInfos",
"sending TStreamerInfo: %s, version = %d",
678 if (
Send(messinfo) < 0)
679 Warning(
"SendStreamerInfos",
"problems sending TStreamerInfo's ...");
696 for (
Int_t ipid = 0; ipid < npids; ipid++) {
710 minilist =
new TList();
712 Info(
"SendProcessIDs",
"sending TProcessID: %s", pid->
GetTitle());
719 if (
Send(messpid) < 0)
720 Warning(
"SendProcessIDs",
"problems sending TProcessID's ...");
737 if ((n =
Recv(str, max, kind)) <= 0) {
746 Error(
"Recv",
"got message of wrong kind (expected %d, got %d)",
766 if ((n =
Recv(mess)) <= 0) {
799 if ((n =
Recv(mess)) <= 0) {
836 if (n == 0 || n == -5) {
846 char *buf =
new char[len+
sizeof(
UInt_t)];
848 if (n == 0 || n == -5) {
872 char ok[2] = {
'o',
'k' };
883 mess->SetWhat(mess->What() & ~
kMESS_ACK);
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",
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());
1067 if (level < 0) level = 0;
1068 if (level > 99) level = 99;
1119 }
else if (sproto.
Contains(
"rootd")) {
1121 }
else if (sproto.
Contains(
"proofd")) {
1126 if (!strncasecmp(opt,
"S", 1)) {
1127 if (
Send(
"slave") < 0)
return rc;
1128 }
else if (!strncasecmp(opt,
"M", 1)) {
1129 if (
Send(
"master") < 0)
return rc;
1132 "called by TSlave: unknown option '%c' %s",
1133 opt[0],
" - assuming Slave");
1134 if (
Send(
"slave") < 0)
return rc;
1138 Info(
"Authenticate",
"Local protocol: %s",sproto.
Data());
1184 gROOT->GetPluginManager()->FindHandler(
"TVirtualAuth", alib);
1186 Error(
"Authenticate",
1187 "could not load properly %s authentication plugin", alib.
Data());
1194 Error(
"Authenticate",
"could not instantiate the interface class");
1198 Info(
"Authenticate",
"class for '%s' authentication loaded", alib.
Data());
1202 Error(
"Authenticate",
1203 "authentication attempt failed for %s@%s", user, host.
Data());
1213 Warning(
"Authenticate",
"problem sending kROOTD_USER (%s,%s)", u->
fUser.
Data(), user);
1217 Warning(
"Authenticate",
"problem sending kROOTD_USER (-1,%s)", user);
1223 if (
Recv(stat, kind) > 0) {
1234 Info(
"Authenticate",
"no authentication required remotely");
1240 Info(
"Authenticate",
"expected message type %d, received %d",
1245 Info(
"Authenticate",
"error receiving message");
1332 if (((proto.
EndsWith(
"p") || size > 1) &&
1357 if (opensock && opensock->
IsValid())
1363 if (sock && sock->
IsValid()) {
1386 if (opensock && opensock->
IsValid())
1467 if (
TString(
TUrl(url).GetProtocol()).Length() > 0) {
1472 if (!user || strlen(user) > 0) {
1480 eurl += (port > 0 ? port : 0);
1505 err = (err < kErrError) ? ((err > -1) ? err : 0) :
kErrError;
Describe Streamer information for one class version.
virtual const char * GetName() const
Returns name of object.
virtual UInt_t GetUniqueID() const
Return the unique object id.
virtual void WriteString(const char *s)
Write string to I/O buffer.
virtual Bool_t IsValid() const
Bool_t RecvStreamerInfos(TMessage *mess)
Receive a message containing streamer infos.
Int_t GetCompressionLevel() const
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
char * CompBuffer() const
R__EXTERN const char * gRootdErrStr[]
void SetCompressionSettings(Int_t settings=1)
Used to specify the compression level and algorithm: settings = 100 * algorithm + level...
Collectable string class.
const char * GetHostName() const
Bool_t RecvProcessIDs(TMessage *mess)
Receive a message containing process ids.
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
virtual Int_t SetOption(ESockOptions opt, Int_t val)
Set socket options.
This class represents a WWW compatible URL.
TString & ReplaceAll(const TString &s1, const TString &s2)
static Int_t fgClientProtocol
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
const char * GetProtocol() const
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual TSecContext * Authenticate(TSocket *, const char *host, const char *user, Option_t *options)=0
virtual Int_t GetEntries() const
This class represents an Internet Protocol (IP) address.
virtual void CloseConnection(int sock, Bool_t force=kFALSE)
Close socket connection.
This class implements a mutex interface.
static ULong64_t GetSocketBytesRecv()
Get total number of bytes received via all sockets.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Int_t LoadPlugin()
Load the plugin library for this handler.
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.
Option_t * GetOption() const
TObject * At(Int_t idx) const
virtual TInetAddress GetPeerName(int sock)
Get Internet Protocol (IP) address of remote host and port #.
TInetAddress fLocalAddress
virtual int SendRaw(int sock, const void *buffer, int length, int flag)
Send exactly length bytes from buffer.
virtual char * GetServiceByPort(int port)
Get name of internet service.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
virtual TObject * ReadObject(const TClass *cl)
Read object from I/O buffer.
static TObjArray * GetPIDs()
static: returns array of TProcessIDs
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
TVirtualMutex * fLastUsageMtx
UShort_t net2host(UShort_t x)
The TNamed class is the base class for all named ROOT classes.
virtual char * ReadString(char *s, Int_t max)
Read string from I/O buffer.
static TSocket * CreateAuthSocket(const char *user, const char *host, Int_t port, Int_t size=0, Int_t tcpwindowsize=-1, TSocket *s=0, Int_t *err=0)
Creates a socket or a parallel socket and authenticates to the remote server specified in 'url' on re...
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
virtual UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
virtual int RecvRaw(int sock, void *buffer, int length, int flag)
Receive exactly length bytes into buffer.
A TProcessID identifies a ROOT job in a unique way in time and space.
Bool_t TestBitNumber(UInt_t bitnumber) const
virtual TInetAddress GetHostByName(const char *server)
Get Internet Protocol (IP) address of host.
void SetCompressionLevel(Int_t level=1)
See comments for function SetCompressionSettings.
virtual Int_t GetLocalPort()
Return the local port # to which the socket is bound.
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
virtual void Close(Option_t *opt="")
Close the socket.
virtual Int_t Select(Int_t interest=kRead, Long_t timeout=-1)
Waits for this socket to change status.
R__EXTERN TSystem * gSystem
Long_t ExecPlugin(int nargs, const T &... params)
static void NetError(const char *where, Int_t error)
Print error string depending on error code.
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
static ULong64_t GetSocketBytesSent()
Get total number of bytes sent via all sockets.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Int_t IncrementCount()
Increase the reference count to this object.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
char * Form(const char *fmt,...)
void SetCompressionAlgorithm(Int_t algorithm=0)
See comments for function SetCompressionSettings.
void MarkBrokenConnection()
Close the socket and mark as due to a broken connection.
virtual TObjLink * FirstLink() const
#define R__LOCKGUARD2(mutex)
virtual int OpenConnection(const char *server, int port, int tcpwindowsize=-1, const char *protocol="tcp")
Open a connection to another host.
virtual int SetSockOpt(int sock, int kind, int val)
Set socket option.
virtual Int_t Select(TList *active, Long_t timeout)
Select on active file descriptors (called by TMonitor).
virtual TInetAddress GetLocalInetAddress()
Return internet address of local host to which the socket is bound.
TString & Remove(Ssiz_t pos)
TObject * UncheckedAt(Int_t i) const
Wrapper around a TObject so it can be stored in a TList.
Int_t IndexOf(const TObject *obj) const
unsigned long long ULong64_t
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static constexpr double s
virtual Bool_t IsAuthenticated() const
virtual TInetAddress GetSockName(int sock)
Get Internet Protocol (IP) address of host and port #.
Int_t GetCompressionLevel() const
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Mother of all ROOT objects.
TObjArray * GetElements() const
static ULong64_t fgBytesSent
TObject * GetObject() const
Int_t GetClassVersion() const
void SetLength() const
Set the message length at the beginning of the message buffer.
void BuildCheck(TFile *file=0)
Check if built and consistent with the class dictionary.
Int_t GetErrorCode() const
Returns error code.
virtual int GetServiceByName(const char *service)
Get port # of internet service.
void SendProcessIDs(const TMessage &mess)
Check if TProcessIDs must be sent.
virtual void Add(TObject *obj)
static ULong64_t fgBytesRecv
Int_t GetEntries() const
Return the number of objects in array (i.e.
static Int_t GetClientProtocol()
Static method returning supported client protocol.
TInetAddress GetInetAddress() const
static void ResetErrno()
Static function resetting system error number.
Undefined compression algorithm (must be kept the last of the list in case a new algorithm is added)...
Bool_t TestBitNumber(UInt_t bitnumber) const
virtual const char * GetName() const
Returns name of object.
virtual int GetSockOpt(int sock, int kind, int *val)
Get socket option.
virtual Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
void SetBitNumber(UInt_t bitnumber, Bool_t value=kTRUE)
virtual void WriteObject(const TObject *obj, Bool_t cacheReuse=kTRUE)
Write object to I/O buffer.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
TSecContext * fSecContext
Bool_t Authenticate(const char *user)
Authenticated the socket with specified user.
TVirtualMutex * gSocketAuthMutex
void Resize(Ssiz_t n)
Resize the string. Truncate or add blanks as necessary.
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const