xrootd
XrdClXRootDMsgHandler.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // Copyright (c) 2011-2014 by European Organization for Nuclear Research (CERN)
3 // Author: Lukasz Janyst <ljanyst@cern.ch>
4 //------------------------------------------------------------------------------
5 // This file is part of the XRootD software suite.
6 //
7 // XRootD is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Lesser General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // XRootD is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with XRootD. If not, see <http://www.gnu.org/licenses/>.
19 //
20 // In applying this licence, CERN does not waive the privileges and immunities
21 // granted to it by virtue of its status as an Intergovernmental Organization
22 // or submit itself to any jurisdiction.
23 //------------------------------------------------------------------------------
24 
25 #ifndef __XRD_CL_XROOTD_MSG_HANDLER_HH__
26 #define __XRD_CL_XROOTD_MSG_HANDLER_HH__
27 
30 #include "XrdCl/XrdClDefaultEnv.hh"
31 #include "XrdCl/XrdClMessage.hh"
32 #include "XProtocol/XProtocol.hh"
33 #include "XrdCl/XrdClLog.hh"
34 #include "XrdCl/XrdClConstants.hh"
35 
36 #include "XrdSys/XrdSysPthread.hh"
37 
38 #include <sys/uio.h>
39 
40 #include <list>
41 #include <memory>
42 
43 #if __cplusplus >= 201103L
44 #include <atomic>
45 #endif
46 
47 namespace XrdCl
48 {
49  class PostMaster;
50  class SIDManager;
51  class URL;
52  class LocalFileHandler;
53  class Socket;
54 
55  //----------------------------------------------------------------------------
56  // Single entry in the redirect-trace-back
57  //----------------------------------------------------------------------------
59  {
60  enum Type
61  {
66  };
67 
68  RedirectEntry( const URL &from, const URL &to, Type type ) :
69  from( from ), to( to ), type( type )
70  {
71 
72  }
73 
78 
79  std::string ToString( bool prevok = true )
80  {
81  const std::string tostr = to.GetLocation();
82  const std::string fromstr = from.GetLocation();
83 
84  if( prevok )
85  {
86  switch( type )
87  {
88  case EntryRedirect: return "Redirected from: " + fromstr + " to: "
89  + tostr;
90 
91  case EntryRedirectOnWait: return "Server responded with wait. "
92  "Falling back to virtual redirector: " + tostr;
93 
94  case EntryRetry: return "Retrying: " + tostr;
95 
96  case EntryWait: return "Waited at server request. Resending: "
97  + tostr;
98  }
99  }
100  return "Failed at: " + fromstr + ", retrying at: " + tostr;
101  }
102  };
103 
104  //----------------------------------------------------------------------------
106  //----------------------------------------------------------------------------
108  public OutgoingMsgHandler
109  {
110  friend class HandleRspJob;
111 
112  public:
113  //------------------------------------------------------------------------
122  //------------------------------------------------------------------------
124  ResponseHandler *respHandler,
125  const URL *url,
126  std::shared_ptr<SIDManager> sidMgr,
127  LocalFileHandler *lFileHandler):
128  pRequest( msg ),
129  pResponse( 0 ),
130  pResponseHandler( respHandler ),
131  pUrl( *url ),
133  pSidMgr( sidMgr ),
134  pLFileHandler( lFileHandler ),
135  pExpiration( 0 ),
136  pRedirectAsAnswer( false ),
137  pOksofarAsAnswer( false ),
138  pHosts( 0 ),
139  pHasLoadBalancer( false ),
140  pHasSessionId( false ),
141  pChunkList( 0 ),
142  pRedirectCounter( 0 ),
144 
145  pAsyncOffset( 0 ),
146  pAsyncChunkIndex( 0 ),
147  pAsyncReadSize( 0 ),
148  pAsyncReadBuffer( 0 ),
149  pAsyncMsgSize( 0 ),
150 
151  pReadRawStarted( false ),
153 
154  pReadVRawMsgOffset( 0 ),
155  pReadVRawChunkHeaderDone( false ),
157  pReadVRawSizeError( false ),
158  pReadVRawChunkIndex( 0 ),
159  pReadVRawMsgDiscard( false ),
160 
161  pOtherRawStarted( false ),
162 
163  pFollowMetalink( false ),
164 
165  pStateful( false ),
166 
167  pAggregatedWaitTime( 0 ),
168 
169  pMsgInFly( false ),
170 
171  pTimeoutFence( false ),
172 
173  pDirListStarted( false ),
174  pDirListWithStat( false ),
175 
176  pCV( 0 )
177 
178  {
180  if( msg->GetSessionId() )
181  pHasSessionId = true;
182  memset( &pReadVRawChunkHeader, 0, sizeof( readahead_list ) );
183 
184  Log *log = DefaultEnv::GetLog();
185  log->Debug( ExDbgMsg, "[%s] MsgHandler created: 0x%x (message: %s ).",
186  pUrl.GetHostId().c_str(), this,
187  pRequest->GetDescription().c_str() );
188  }
189 
190  //------------------------------------------------------------------------
192  //------------------------------------------------------------------------
194  {
196 
197  if( !pHasSessionId )
198  delete pRequest;
199  delete pResponse;
200  std::vector<Message *>::iterator it;
201  for( it = pPartialResps.begin(); it != pPartialResps.end(); ++it )
202  delete *it;
203 
205 
206  pRequest = reinterpret_cast<Message*>( 0xDEADBEEF );
207  pResponse = reinterpret_cast<Message*>( 0xDEADBEEF );
208  pResponseHandler = reinterpret_cast<ResponseHandler*>( 0xDEADBEEF );
209  pPostMaster = reinterpret_cast<PostMaster*>( 0xDEADBEEF );
210  pLFileHandler = reinterpret_cast<LocalFileHandler*>( 0xDEADBEEF );
211  pHosts = reinterpret_cast<HostList*>( 0xDEADBEEF );
212  pChunkList = reinterpret_cast<ChunkList*>( 0xDEADBEEF );
213  pEffectiveDataServerUrl = reinterpret_cast<URL*>( 0xDEADBEEF );
214 
215  Log *log = DefaultEnv::GetLog();
216  log->Debug( ExDbgMsg, "[%s] Destroying MsgHandler: 0x%x.",
217  pUrl.GetHostId().c_str(), this );
218  }
219 
220  //------------------------------------------------------------------------
226  //------------------------------------------------------------------------
227  virtual uint16_t Examine( Message *msg );
228 
229  //------------------------------------------------------------------------
233  //------------------------------------------------------------------------
234  virtual uint16_t GetSid() const;
235 
236  //------------------------------------------------------------------------
240  //------------------------------------------------------------------------
241  virtual void Process( Message *msg );
242 
243  //------------------------------------------------------------------------
253  //------------------------------------------------------------------------
254  virtual Status ReadMessageBody( Message *msg,
255  Socket *socket,
256  uint32_t &bytesRead );
257 
258  //------------------------------------------------------------------------
264  //------------------------------------------------------------------------
265  virtual uint8_t OnStreamEvent( StreamEvent event,
266  XRootDStatus status );
267 
268  //------------------------------------------------------------------------
270  //------------------------------------------------------------------------
271  virtual void OnStatusReady( const Message *message,
272  XRootDStatus status );
273 
274  //------------------------------------------------------------------------
276  //------------------------------------------------------------------------
277  virtual bool IsRaw() const;
278 
279  //------------------------------------------------------------------------
288  //------------------------------------------------------------------------
289  Status WriteMessageBody( Socket *socket,
290  uint32_t &bytesWritten );
291 
292  //------------------------------------------------------------------------
296  //------------------------------------------------------------------------
297  void WaitDone( time_t now );
298 
299  //------------------------------------------------------------------------
301  //------------------------------------------------------------------------
302  void SetExpiration( time_t expiration )
303  {
304  pExpiration = expiration;
305  }
306 
307  //------------------------------------------------------------------------
310  //------------------------------------------------------------------------
311  void SetRedirectAsAnswer( bool redirectAsAnswer )
312  {
313  pRedirectAsAnswer = redirectAsAnswer;
314  }
315 
316  //------------------------------------------------------------------------
319  //------------------------------------------------------------------------
320  void SetOksofarAsAnswer( bool oksofarAsAnswer )
321  {
322  pOksofarAsAnswer = oksofarAsAnswer;
323  }
324 
325  //------------------------------------------------------------------------
327  //------------------------------------------------------------------------
328  const Message *GetRequest() const
329  {
330  return pRequest;
331  }
332 
333  //------------------------------------------------------------------------
335  //------------------------------------------------------------------------
336  void SetLoadBalancer( const HostInfo &loadBalancer )
337  {
338  if( !loadBalancer.url.IsValid() )
339  return;
340  pLoadBalancer = loadBalancer;
341  pHasLoadBalancer = true;
342  }
343 
344  //------------------------------------------------------------------------
346  //------------------------------------------------------------------------
347  void SetHostList( HostList *hostList )
348  {
349  delete pHosts;
350  pHosts = hostList;
351  }
352 
353  //------------------------------------------------------------------------
355  //------------------------------------------------------------------------
356  void SetChunkList( ChunkList *chunkList )
357  {
358  pChunkList = chunkList;
359  if( chunkList )
360  pChunkStatus.resize( chunkList->size() );
361  else
362  pChunkStatus.clear();
363  }
364 
365  //------------------------------------------------------------------------
367  //------------------------------------------------------------------------
368  void SetRedirectCounter( uint16_t redirectCounter )
369  {
370  pRedirectCounter = redirectCounter;
371  }
372 
373  void SetFollowMetalink( bool followMetalink )
374  {
375  pFollowMetalink = followMetalink;
376  }
377 
378  void SetStateful( bool stateful )
379  {
380  pStateful = stateful;
381  }
382 
383  //------------------------------------------------------------------------
385  //------------------------------------------------------------------------
386  void TakeDownTimeoutFence();
387 
388  private:
389 
390  //------------------------------------------------------------------------
392  //------------------------------------------------------------------------
393  Status ReadRawRead( Message *msg,
394  Socket *socket,
395  uint32_t &bytesRead );
396 
397  //------------------------------------------------------------------------
399  //------------------------------------------------------------------------
401  Socket *socket,
402  uint32_t &bytesRead );
403 
404  //------------------------------------------------------------------------
406  //------------------------------------------------------------------------
408  Socket *socket,
409  uint32_t &bytesRead );
410 
411  //------------------------------------------------------------------------
414  //------------------------------------------------------------------------
415  Status ReadAsync( Socket *socket, uint32_t &btesRead );
416 
417  //------------------------------------------------------------------------
419  //------------------------------------------------------------------------
420  void HandleError( XRootDStatus status, Message *msg = 0 );
421 
422  //------------------------------------------------------------------------
424  //------------------------------------------------------------------------
425  Status RetryAtServer( const URL &url, RedirectEntry::Type entryType );
426 
427  //------------------------------------------------------------------------
429  //------------------------------------------------------------------------
430  void HandleResponse();
431 
432  //------------------------------------------------------------------------
434  //------------------------------------------------------------------------
436 
437  //------------------------------------------------------------------------
440  //------------------------------------------------------------------------
441  Status ParseResponse( AnyObject *&response );
442 
443  //------------------------------------------------------------------------
446  //------------------------------------------------------------------------
447  Status ParseXAttrResponse( char *data, size_t len, AnyObject *&response );
448 
449  //------------------------------------------------------------------------
452  //------------------------------------------------------------------------
453  Status RewriteRequestRedirect( const URL &newUrl );
454 
455  //------------------------------------------------------------------------
457  //------------------------------------------------------------------------
459 
460  //------------------------------------------------------------------------
462  //------------------------------------------------------------------------
463  Status PostProcessReadV( VectorReadInfo *vReadInfo );
464 
465  //------------------------------------------------------------------------
467  //------------------------------------------------------------------------
469 
470  //------------------------------------------------------------------------
472  //------------------------------------------------------------------------
473  void UpdateTriedCGI(uint32_t errNo=0);
474 
475  //------------------------------------------------------------------------
477  //------------------------------------------------------------------------
478  void SwitchOnRefreshFlag();
479 
480  //------------------------------------------------------------------------
483  //------------------------------------------------------------------------
484  void HandleRspOrQueue();
485 
486  //------------------------------------------------------------------------
488  //------------------------------------------------------------------------
489  void HandleLocalRedirect( URL *url );
490 
491  //------------------------------------------------------------------------
496  //------------------------------------------------------------------------
497  bool IsRetriable( Message *request );
498 
499  //------------------------------------------------------------------------
506  //------------------------------------------------------------------------
507  bool OmitWait( Message *request, const URL &url );
508 
509  //------------------------------------------------------------------------
515  //------------------------------------------------------------------------
516  bool RetriableErrorResponse( const Status &status );
517 
518  //------------------------------------------------------------------------
520  //------------------------------------------------------------------------
521  void DumpRedirectTraceBack();
522 
529  //------------------------------------------------------------------------
530  template<typename T>
531  Status ReadFromBuffer( char *&buffer, size_t &buflen, T& result );
532 
533  //------------------------------------------------------------------------
540  //------------------------------------------------------------------------
541  Status ReadFromBuffer( char *&buffer, size_t &buflen, std::string &result );
542 
543  //------------------------------------------------------------------------
551  //------------------------------------------------------------------------
552  Status ReadFromBuffer( char *&buffer, size_t &buflen, size_t size,
553  std::string &result );
554 
555  //------------------------------------------------------------------------
556  // Helper struct for async reading of chunks
557  //------------------------------------------------------------------------
558  struct ChunkStatus
559  {
560  ChunkStatus(): sizeError( false ), done( false ) {}
561  bool sizeError;
562  bool done;
563  };
564 
565  typedef std::list<std::unique_ptr<RedirectEntry>> RedirectTraceBack;
566 
569  std::vector<Message *> pPartialResps;
574  std::shared_ptr<SIDManager> pSidMgr;
578  time_t pExpiration;
585  std::string pRedirectUrl;
587  std::vector<ChunkStatus> pChunkStatus;
590 
591  uint32_t pAsyncOffset;
593  uint32_t pAsyncReadSize;
595  uint32_t pAsyncMsgSize;
596 
599 
607 
609 
611 
612  bool pStateful;
614 
615  std::unique_ptr<RedirectEntry> pRdirEntry;
617 
618  bool pMsgInFly;
619 
620  //------------------------------------------------------------------------
621  // true if MsgHandler is both in inQueue and installed in respective
622  // Stream (this could happen if server gave oksofar response), otherwise
623  // false
624  //------------------------------------------------------------------------
625 #if __cplusplus >= 201103L
626  std::atomic<bool> pTimeoutFence;
627 #else
629 #endif
630 
631  //------------------------------------------------------------------------
632  // if we are serving chunked data to the user's handler in case of
633  // kXR_dirlist we need to memorize if the response contains stat info or
634  // not (the information is only encoded in the first chunk)
635  //------------------------------------------------------------------------
638 
639  //------------------------------------------------------------------------
640  // synchronization is needed in case the MsgHandler has been configured
641  // to serve kXR_oksofar as a response to the user's handler
642  //------------------------------------------------------------------------
644  };
645 }
646 
647 #endif // __XRD_CL_XROOTD_MSG_HANDLER_HH__
Status ParseXAttrResponse(char *data, size_t len, AnyObject *&response)
uint32_t pAsyncChunkIndex
Definition: XrdClXRootDMsgHandler.hh:592
bool pOtherRawStarted
Definition: XrdClXRootDMsgHandler.hh:608
void HandleError(XRootDStatus status, Message *msg=0)
Recover error.
std::vector< Message * > pPartialResps
Definition: XrdClXRootDMsgHandler.hh:569
Definition: XrdClAnyObject.hh:32
URL to
Definition: XrdClXRootDMsgHandler.hh:75
Status ReadRawReadV(Message *msg, Socket *socket, uint32_t &bytesRead)
Handle a kXR_readv in raw mode.
void UpdateTriedCGI(uint32_t errNo=0)
Update the "tried=" part of the CGI of the current message.
virtual uint16_t GetSid() const
const uint64_t ExDbgMsg
Definition: XrdClConstants.hh:41
std::vector< ChunkInfo > ChunkList
List of chunks.
Definition: XrdClXRootDResponses.hh:904
Status RetryAtServer(const URL &url, RedirectEntry::Type entryType)
Retry the request at another server.
PostMaster * pPostMaster
Definition: XrdClXRootDMsgHandler.hh:573
Status RewriteRequestWait()
Some requests need to be rewritten also after getting kXR_wait - sigh.
Definition: XProtocol.hh:609
The message representation used throughout the system.
Definition: XrdClMessage.hh:29
ChunkStatus()
Definition: XrdClXRootDMsgHandler.hh:560
bool RetriableErrorResponse(const Status &status)
void SetRedirectCounter(uint16_t redirectCounter)
Set the redirect counter.
Definition: XrdClXRootDMsgHandler.hh:368
bool pReadRawStarted
Definition: XrdClXRootDMsgHandler.hh:597
~XRootDMsgHandler()
Destructor.
Definition: XrdClXRootDMsgHandler.hh:193
void SetFollowMetalink(bool followMetalink)
Definition: XrdClXRootDMsgHandler.hh:373
RedirectTraceBack pRedirectTraceBack
Definition: XrdClXRootDMsgHandler.hh:616
URL from
Definition: XrdClXRootDMsgHandler.hh:74
LocalFileHandler * pLFileHandler
Definition: XrdClXRootDMsgHandler.hh:575
uint16_t pNotAuthorizedCounter
Definition: XrdClXRootDMsgHandler.hh:589
std::string ToString(bool prevok=true)
Definition: XrdClXRootDMsgHandler.hh:79
const std::string & GetDescription() const
Get the description of the message.
Definition: XrdClMessage.hh:74
std::vector< ChunkStatus > pChunkStatus
Definition: XrdClXRootDMsgHandler.hh:587
std::string GetLocation() const
Get location (protocol://host:port/path)
Definition: XrdClXRootDMsgHandler.hh:558
XRootDMsgHandler(Message *msg, ResponseHandler *respHandler, const URL *url, std::shared_ptr< SIDManager > sidMgr, LocalFileHandler *lFileHandler)
Definition: XrdClXRootDMsgHandler.hh:123
uint32_t pReadVRawMsgOffset
Definition: XrdClXRootDMsgHandler.hh:600
friend class HandleRspJob
Definition: XrdClXRootDMsgHandler.hh:110
bool pReadVRawChunkHeaderDone
Definition: XrdClXRootDMsgHandler.hh:601
Status ParseResponse(AnyObject *&response)
StreamEvent
Events that may have occurred to the stream.
Definition: XrdClPostMasterInterfaces.hh:94
std::string GetHostId() const
Get the host part of the URL (user:password@host:port)
Definition: XrdClURL.hh:94
bool pFollowMetalink
Definition: XrdClXRootDMsgHandler.hh:610
Status ReadFromBuffer(char *&buffer, size_t &buflen, T &result)
bool done
Definition: XrdClXRootDMsgHandler.hh:562
Procedure execution status.
Definition: XrdClStatus.hh:110
Status RewriteRequestRedirect(const URL &newUrl)
URL pUrl
Definition: XrdClXRootDMsgHandler.hh:571
virtual void Process(Message *msg)
Status ReadRawRead(Message *msg, Socket *socket, uint32_t &bytesRead)
Handle a kXR_read in raw mode.
virtual void OnStatusReady(const Message *message, XRootDStatus status)
The requested action has been performed and the status is available.
Message * pRequest
Definition: XrdClXRootDMsgHandler.hh:567
Status UnPackReadVResponse(Message *msg)
Unpack a single readv response.
Definition: XrdClXRootDMsgHandler.hh:63
time_t pExpiration
Definition: XrdClXRootDMsgHandler.hh:578
void SetExpiration(time_t expiration)
Set a timestamp after which we give up.
Definition: XrdClXRootDMsgHandler.hh:302
uint16_t pRedirectCounter
Definition: XrdClXRootDMsgHandler.hh:588
std::shared_ptr< SIDManager > pSidMgr
Definition: XrdClXRootDMsgHandler.hh:574
static Log * GetLog()
Get default log.
bool pHasSessionId
Definition: XrdClXRootDMsgHandler.hh:584
ChunkList * pChunkList
Definition: XrdClXRootDMsgHandler.hh:586
Definition: XrdClXRootDResponses.hh:957
char * pAsyncReadBuffer
Definition: XrdClXRootDMsgHandler.hh:594
std::vector< HostInfo > HostList
Definition: XrdClXRootDResponses.hh:969
virtual uint16_t Examine(Message *msg)
bool pOksofarAsAnswer
Definition: XrdClXRootDMsgHandler.hh:580
Status ReadRawOther(Message *msg, Socket *socket, uint32_t &bytesRead)
Handle anything other than kXR_read and kXR_readv in raw mode.
bool pDirListWithStat
Definition: XrdClXRootDMsgHandler.hh:637
std::list< std::unique_ptr< RedirectEntry > > RedirectTraceBack
Definition: XrdClXRootDMsgHandler.hh:565
uint64_t GetSessionId() const
Get the session ID the message is meant for.
Definition: XrdClMessage.hh:90
Definition: XrdSysPthread.hh:78
bool pReadVRawMsgDiscard
Definition: XrdClXRootDMsgHandler.hh:606
Message * pResponse
Definition: XrdClXRootDMsgHandler.hh:568
RedirectEntry(const URL &from, const URL &to, Type type)
Definition: XrdClXRootDMsgHandler.hh:68
bool IsValid() const
Is the url valid.
XRootDStatus pStatus
Definition: XrdClXRootDMsgHandler.hh:576
XRootDStatus status
Definition: XrdClXRootDMsgHandler.hh:77
Request status.
Definition: XrdClXRootDResponses.hh:214
URL * pEffectiveDataServerUrl
Definition: XrdClXRootDMsgHandler.hh:572
Definition: XrdClAnyObject.hh:25
void TakeDownTimeoutFence()
Take down the timeout fence after oksofar response has been handled.
Status PostProcessReadV(VectorReadInfo *vReadInfo)
Post process vector read.
Message handler.
Definition: XrdClPostMasterInterfaces.hh:71
Type type
Definition: XrdClXRootDMsgHandler.hh:76
int pAggregatedWaitTime
Definition: XrdClXRootDMsgHandler.hh:613
void SwitchOnRefreshFlag()
Switch on the refresh flag for some requests.
void SetChunkList(ChunkList *chunkList)
Set the chunk list.
Definition: XrdClXRootDMsgHandler.hh:356
bool pDirListStarted
Definition: XrdClXRootDMsgHandler.hh:636
void SetRedirectAsAnswer(bool redirectAsAnswer)
Definition: XrdClXRootDMsgHandler.hh:311
std::string pRedirectUrl
Definition: XrdClXRootDMsgHandler.hh:585
URL url
URL of the host.
Definition: XrdClXRootDResponses.hh:966
bool sizeError
Definition: XrdClXRootDMsgHandler.hh:561
bool pRedirectAsAnswer
Definition: XrdClXRootDMsgHandler.hh:579
bool pStateful
Definition: XrdClXRootDMsgHandler.hh:612
void HandleLocalRedirect(URL *url)
Handle a redirect to a local file.
Vector read info.
Definition: XrdClXRootDResponses.hh:909
Handle an async response.
Definition: XrdClXRootDResponses.hh:974
void SetStateful(bool stateful)
Definition: XrdClXRootDMsgHandler.hh:378
Definition: XrdClLocalFileHandler.hh:32
uint32_t pAsyncMsgSize
Definition: XrdClXRootDMsgHandler.hh:595
const Message * GetRequest() const
Get the request pointer.
Definition: XrdClXRootDMsgHandler.hh:328
virtual bool IsRaw() const
Are we a raw writer or not?
uint32_t pAsyncReadSize
Definition: XrdClXRootDMsgHandler.hh:593
URL representation.
Definition: XrdClURL.hh:30
uint32_t pAsyncOffset
Definition: XrdClXRootDMsgHandler.hh:591
bool OmitWait(Message *request, const URL &url)
bool pReadVRawSizeError
Definition: XrdClXRootDMsgHandler.hh:603
Status WriteMessageBody(Socket *socket, uint32_t &bytesWritten)
std::unique_ptr< RedirectEntry > pRdirEntry
Definition: XrdClXRootDMsgHandler.hh:615
HostList * pHosts
Definition: XrdClXRootDMsgHandler.hh:581
int32_t pReadVRawChunkIndex
Definition: XrdClXRootDMsgHandler.hh:604
Definition: XrdClXRootDMsgHandler.hh:62
void WaitDone(time_t now)
virtual uint8_t OnStreamEvent(StreamEvent event, XRootDStatus status)
XRootDStatus * ProcessStatus()
Extract the status information from the stuff that we got.
Status pLastError
Definition: XrdClXRootDMsgHandler.hh:577
uint32_t pReadRawCurrentOffset
Definition: XrdClXRootDMsgHandler.hh:598
Message status handler.
Definition: XrdClPostMasterInterfaces.hh:168
virtual Status ReadMessageBody(Message *msg, Socket *socket, uint32_t &bytesRead)
Definition: XrdClXRootDMsgHandler.hh:65
A hub for dispatching and receiving messages.
Definition: XrdClPostMaster.hh:47
Status ReadAsync(Socket *socket, uint32_t &btesRead)
Type
Definition: XrdClXRootDMsgHandler.hh:60
bool pReadVRawChunkHeaderStarted
Definition: XrdClXRootDMsgHandler.hh:602
HostInfo pLoadBalancer
Definition: XrdClXRootDMsgHandler.hh:583
static PostMaster * GetPostMaster()
Get default post master.
Handle/Process/Forward XRootD messages.
Definition: XrdClXRootDMsgHandler.hh:107
XrdSysCondVar pCV
Definition: XrdClXRootDMsgHandler.hh:643
bool IsRetriable(Message *request)
void Debug(uint64_t topic, const char *format,...)
Print a debug message.
void HandleResponse()
Unpack the message and call the response handler.
bool pHasLoadBalancer
Definition: XrdClXRootDMsgHandler.hh:582
ResponseHandler * pResponseHandler
Definition: XrdClXRootDMsgHandler.hh:570
Definition: XrdClXRootDMsgHandler.hh:58
bool pMsgInFly
Definition: XrdClXRootDMsgHandler.hh:618
bool pTimeoutFence
Definition: XrdClXRootDMsgHandler.hh:628
A network socket.
Definition: XrdClSocket.hh:40
void SetOksofarAsAnswer(bool oksofarAsAnswer)
Definition: XrdClXRootDMsgHandler.hh:320
void DumpRedirectTraceBack()
Dump the redirect-trace-back into the log file.
Handle diagnostics.
Definition: XrdClLog.hh:101
void SetLoadBalancer(const HostInfo &loadBalancer)
Set the load balancer.
Definition: XrdClXRootDMsgHandler.hh:336
Definition: XrdClXRootDMsgHandler.hh:64
readahead_list pReadVRawChunkHeader
Definition: XrdClXRootDMsgHandler.hh:605
void SetHostList(HostList *hostList)
Set host list.
Definition: XrdClXRootDMsgHandler.hh:347