25#include "XrdVersion.hh"
31#include "XrdSec/XrdSecInterface.hh"
35# include <sys/socket.h>
47#define URLTAG "["<<fUrl.Host<<":"<<fUrl.Port<<"]"
67 " opening a connection" <<
" to server "<<
URLTAG);
84 if (
fUser.length() <= 0) {
99 char *
hn = XrdSysDNS::getHostName(((
fUrl.
Host.length() > 0) ?
114 TRACE(
XERR,
"service 'proofd' not found by getservbyname" <<
115 ": using default IANA assigned tcp port 1093");
122 " for service 'proofd'");
167 msg.erase(
msg.rfind(
":"));
177 TRACE(
DBG,
"access to server granted.");
204 const char *
ctype[2] = {
"UNIX",
"TCP"};
211#if ROOTXRDVERS <= ROOT_PhyConnNoReuse
213 TRACE(
XERR,
"Reusing an existing connection (descriptor "<<fd<<
214 ") not supported by the xroot client version (requires xrootd >= 3.0.3)");
318 TRACE(
XERR,
"client already logged-in at "<<
URLTAG<<
" (!): protocol error!");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define TRACE(Flag, Args)
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 length
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
R__EXTERN C unsigned int sleep(unsigned int seconds)
#define NAME_CONNECTTIMEOUT
#define NAME_FIRSTCONNECTMAXCNT
int(* XrdProofConnSender_t)(const char *, int, void *)
int ReadRaw(void *buffer, int BufferLength, int substreamid=-1, int *usedsubstreamid=0)
int WriteRaw(const void *buffer, int BufferLength, int substreamid=0)
ERemoteServerType fServerType
XrdClientMessage * ReadMessage(int streamid)
bool Connect(XrdClientUrlInfo RemoteHost, bool isUnix=0)
XrdClientAbsUnsolMsgHandler * UnsolicitedMsgHandler
void TakeUrl(XrdOucString url)
ESrvType DoHandShake(XrdClientPhyConnection *p=0)
Performs initial hand-shake with the server in order to understand which kind of server is there at t...
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
friend class XrdProofPhyConn
XrdClientAbsUnsolMsgHandler * fUnsolMsgHandler
bool Login()
This method perform the loggin-in into the server just after the hand-shake.
XrdClientMessage * ReadMsg()
Pickup message from the queue.
bool Init(const char *url, int fd=-1)
Initialization.
void Connect(int fd=-1)
Run the connection attempts: the result is stored in fConnected.
int TryConnect(int fd=-1)
Connect to remote server.
int ReadRaw(void *buf, int len, XrdClientPhyConnection *=0)
Low level write call.
void Close(const char *opt="")
Close the connection.
void SetAsync(XrdClientAbsUnsolMsgHandler *uh, XrdProofConnSender_t=0, void *=0)
Set handler of unsolicited responses.
int WriteRaw(const void *buf, int len, XrdClientPhyConnection *=0)
Low level write call.
bool GetAccessToSrv(XrdClientPhyConnection *=0)
Gets access to the connected server.