23#define DFLT_CONNECTMAXTRY 10
32#include "XProtocol/XPtypes.hh"
142 const char *logbuf = 0,
Int_t loglevel = -1,
TXHandler *handler = 0);
150 const char *location,
const char *fmt, va_list va)
const;
208 std::lock_guard<std::recursive_mutex> lock(
fAMtx);
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Collectable string class.
Mother of all ROOT objects.
Int_t TryWait()
If the semaphore value is > 0 then decrement it and return 0.
Int_t Post()
Increment the value of the semaphore.
virtual Int_t Recv(TMessage *&mess)
Receive a TMessage object.
virtual Int_t Send(const TMessage &mess)
Send a TMessage object.
Handler of asynchronous events for XProofD sockets.
Implementation of the functionality provided by TProofMgr in the case of a xproofd-based session.
This class implements the XProofD version of TProofServ, with respect to which it differs only for th...
TXSemaphoreGuard(TSemaphore *sem)
virtual ~TXSemaphoreGuard()
This is the version of TSlave for workers servers based on XProofD.
static void SetMemMax(Long64_t memmax)
Return the max allocated memory allowed.
static Long64_t GetMemMax()
Return the max allocated memory allowed.
static Long64_t BuffMem()
Return the currently allocated memory.
static Long64_t fgBuffMem
void Resize(Int_t sz)
resize socket buffer
void SetLoc(const char *loc="")
std::recursive_mutex fMutex
Int_t Clean(TSocket *s)
Read a byte to the global pipe to synchronize message pickup.
virtual ~TXSockPipe()
Destructor.
void DumpReadySock()
Dump content of the ready socket list.
Int_t Post(TSocket *s)
Write a byte to the global pipe to signal new availibility of new messages.
TXSocket * GetLastReady()
Return last ready socket.
Input handler for XProofD sockets.
High level handler of connections to XProofD.
void SetSessionID(Int_t id)
Set session ID to 'id'. If id < 0, disable also the asynchronous handler.
static std::list< TXSockBuf * > fgSQue
Int_t GetSessionID() const
Getter for session ID.
virtual Int_t GetClientID() const
Int_t SetOption(ESockOptions, Int_t)
Set socket options.
void PostSemAll()
Wake up all threads waiting for at the semaphore (used by TXSlave)
Int_t GetLogConnID() const
Getter for logical connection ID.
Int_t Recv(char *mess, Int_t max)
Receive a character string message of maximum max length.
Int_t GetOpenError() const
Getter for last error.
std::list< TXSockBuf * > fAQue
Int_t GetServType() const
Getter for server type.
Int_t Send(Int_t status, Int_t kind)
Send a status and a single message opcode.
static void SetLocation(const char *loc="")
Set location string.
Int_t SendInterrupt(Int_t type)
Send urgent message (interrupt) to remote server Returns 0 or -1 in case of error.
void DoError(int level, const char *location, const char *fmt, va_list va) const
Interface to ErrorHandler (protected).
std::recursive_mutex fAMtx
Bool_t Create(Bool_t attach=kFALSE)
This method sends a request for creation of (or attachment to) a remote server application.
Int_t Send(const char *mess, Int_t kind=kMESS_STRING)
Send a character string buffer.
virtual Int_t GetClientIDSize() const
virtual ~TXSocket()
Destructor.
void PushBackSpare()
Release read buffer giving back to the spare list.
Int_t Recv(char *mess, Int_t max, Int_t &kind)
Receive a character string message of maximum max length.
virtual UnsolRespProcResult ProcessUnsolicitedMsg(XrdClientUnsolMsgSender *s, XrdClientMessage *msg)
We are here if an unsolicited response comes from a logical conn The response comes in the form of an...
virtual void RemoveClientID()
static void InitEnvs()
Init environment variables for XrdClient.
Int_t Send(Int_t kind)
Send a single message opcode.
Bool_t Ping(const char *ord=0)
Ping functionality: contact the server to check its vitality.
std::recursive_mutex fIMtx
TXSockBuf * PopUpSpare(Int_t sz)
Pop-up a buffer of at least size bytes from the spare list If none is found either one is reallocated...
Int_t RecvRaw(void *buf, Int_t len, ESendRecvOptions opt=kDefault)
Receive a raw buffer of specified length bytes.
Int_t GetLowSocket() const
virtual void Close(Option_t *opt="")
Close connection.
Int_t PickUpReady()
Wait and pick-up next buffer from the asynchronous queue.
Int_t Recv(Int_t &status, Int_t &kind)
Receives a status and a message type.
void SetInterrupt(Bool_t i=kTRUE)
void SendUrgent(Int_t type, Int_t int1, Int_t int2)
Send urgent message to counterpart; 'type' specifies the type of the message (see TXSocket::EUrgentMs...
TObjString * SendCoordinator(Int_t kind, const char *msg=0, Int_t int2=0, Long64_t l64=0, Int_t int3=0, const char *opt=0)
Send message to intermediate coordinator.
virtual Int_t Reconnect()
Try reconnection after failure.
void SetSendOpt(ESendRecvOptions o)
Int_t SendRaw(const void *buf, Int_t len, ESendRecvOptions opt=kDontBlock)
Send a raw buffer of specified length.
Int_t Recv(TMessage *&mess)
Receive a TMessage object.
Int_t Flush()
Flush the asynchronous queue.
void DisconnectSession(Int_t id, Option_t *opt="")
Disconnect a session.
Int_t GetInterrupt(Bool_t &forward)
Get latest interrupt level and reset it; if the interrupt has to be propagated to lower stages forwar...
virtual void SetClientID(Int_t)
Int_t GetXrdProofdVersion() const
Int_t Send(const TMessage &mess)
Send a TMessage object.
void CtrlC()
Interrupt the remote protocol instance.
Bool_t IsServProofd()
Return kTRUE if the remote server is a 'proofd'.
void PostMsg(Int_t type, const char *msg=0)
Post a message of type 'type' into the read messages queue.
void SetAWait(Bool_t w=kTRUE)
Bool_t IsValid() const
Getter for validity status.
void RemoteTouch()
Remote touch functionality: contact the server to proof our vitality.
Implementation of TXSocket using PF_UNIX sockets.