12#ifndef ROOT_XrdProofConn 
   13#define ROOT_XrdProofConn 
   25#define DFLT_CONNECTMAXTRY           10 
   32#ifndef __OUC_STRING_H__ 
   33#include "XrdOuc/XrdOucString.hh" 
  104   bool                CheckResp(
struct ServerResponseHeader *resp,
 
  105                                 const char *met, 
bool);
 
  106   virtual void        Connect(
int = -1);
 
  112   virtual bool        Init(
const char *url = 0, 
int = -1);
 
  116                                const void *reqData, 
char **answData);
 
  124   XrdProofConn(
const char *url, 
char mode = 
'M', 
int psid = -1, 
char ver = -1,
 
  128   virtual void        Close(
const char *opt = 
"");
 
  146                               char **answData, 
const char *CmdName,
 
  149   void                SetSID(kXR_char *sid);
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
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
 
int(* XrdProofConnSender_t)(const char *, int, void *)
 
High level handler of connections to XProofD.
 
Implementation of TXSocket using PF_UNIX sockets.
 
ESrvType DoHandShake(XrdClientPhyConnection *p=0)
Performs initial hand-shake with the server in order to understand which kind of server is there at t...
 
virtual int TryConnect(int=-1)
Connect to remote server.
 
static void GetRetryParam(int &maxtry, int &timewait)
Retrieve current values of the retry control parameters, numer of retries and wait time between attem...
 
XrdClientPhyConnection * fPhyConn
 
XrdClientMessage * SendReq(XPClientRequest *req, const void *reqData, char **answData, const char *CmdName, bool notifyerr=1)
SendReq tries to send a single command for a number of times.
 
static void * fgSecGetProtocol
 
virtual bool Init(const char *url=0, int=-1)
Initialization.
 
XrdSecProtocol * Authenticate(char *plist, int lsiz)
Negotiate authentication with the remote server.
 
bool ConnectInterrupt()
Check if interrupted during connect.
 
bool CheckErrorStatus(XrdClientMessage *, int &, const char *, bool)
Check error status.
 
virtual void SetAsync(XrdClientAbsUnsolMsgHandler *uh, XrdProofConnSender_t=0, void *=0)
Set handler of unsolicited responses.
 
XrdProofConnSender_t fSender
 
virtual bool GetAccessToSrv(XrdClientPhyConnection *p=0)
Gets access to the connected server.
 
bool MatchStreamID(struct ServerResponseHeader *resp)
Check stream ID matching.
 
XrdOucRecMutex * fConnectInterruptMtx
 
XrdClientAbsUnsolMsgHandler * fUnsolMsgHandler
 
virtual UnsolRespProcResult ProcessUnsolicitedMsg(XrdClientUnsolMsgSender *s, XrdClientMessage *m)
We are here if an unsolicited response comes from a logical conn The response comes in the form of an...
 
bool IsValid() const
Test validity of this connection.
 
virtual int WriteRaw(const void *buf, int len, XrdClientPhyConnection *p=0)
Low level write call.
 
bool CheckResp(struct ServerResponseHeader *resp, const char *met, bool)
Checks if the server's response is ours.
 
virtual void Close(const char *opt="")
Close connection.
 
XrdClientMessage * SendRecv(XPClientRequest *req, const void *reqData, char **answData)
SendRecv sends a command to the server and to get a response.
 
static XrdClientConnectionMgr * fgConnMgr
 
virtual ~XrdProofConn()
Destructor.
 
short GetSessionID() const
 
virtual XrdClientMessage * ReadMsg()
Pickup message from the queue.
 
void SetSID(kXR_char *sid)
Set our stream id, to match against that one in the server's response.
 
XReqErrorType LowWrite(XPClientRequest *, const void *, int)
Send request to server (NB: req is marshalled at this point, so we need also the plain reqDataLen)
 
const char * GetLastErr()
 
virtual void Connect(int=-1)
Run the connection attempts: the result is stored in fConnected.
 
XrdOucString fLoginBuffer
 
static XrdOucPlugin * fgSecPlugin
 
int GetLowSocket()
Return the socket descriptor of the underlying connection.
 
bool Login()
This method perform the loggin-in into the server just after the hand-shake.
 
void ReConnect()
Perform a reconnection attempt when a connection is not valid any more.
 
static void SetRetryParam(int maxtry=5, int timewait=2)
Change values of the retry control parameters, numer of retries and wait time between attempts (in se...
 
virtual int ReadRaw(void *buf, int len, XrdClientPhyConnection *p=0)
Low level receive call.
 
void SetInterrupt()
Interrupt the underlying socket.
 
void SetConnectInterrupt()
Interrupt connection attempts.