Loading...
Searching...
No Matches
XrdClXRootDMsgHandler.hh
Go to the documentation of this file.
//------------------------------------------------------------------------------
// Copyright (c) 2011-2014 by European Organization for Nuclear Research (CERN)
// Author: Lukasz Janyst <ljanyst@cern.ch>
//------------------------------------------------------------------------------
// This file is part of the XRootD software suite.
//
// XRootD is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// XRootD is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
//
// In applying this licence, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//------------------------------------------------------------------------------
#ifndef __XRD_CL_XROOTD_MSG_HANDLER_HH__
#define __XRD_CL_XROOTD_MSG_HANDLER_HH__
#include "XrdCl/XrdClPostMasterInterfaces.hh"
#include "XrdCl/XrdClXRootDResponses.hh"
#include "XrdCl/XrdClDefaultEnv.hh"
#include "XrdCl/XrdClMessage.hh"
#include "XProtocol/XProtocol.hh"
#include "XrdCl/XrdClLog.hh"
#include "XrdCl/XrdClConstants.hh"
#include "XrdCl/XrdClAsyncPageReader.hh"
#include "XrdCl/XrdClAsyncVectorReader.hh"
#include "XrdCl/XrdClAsyncRawReader.hh"
#include "XrdCl/XrdClAsyncDiscardReader.hh"
#include "XrdClAsyncRawReaderIntfc.hh"
#include "XrdSys/XrdSysPthread.hh"
#include "XrdSys/XrdSysPageSize.hh"
#include "XrdSys/XrdSysKernelBuffer.hh"
#include "XrdSys/XrdSysPlatform.hh"
#include "XrdOuc/XrdOucPgrwUtils.hh"
#include "XrdOuc/XrdOucUtils.hh"
#include <sys/uio.h>
#include <arpa/inet.h> // for network unmarshaling stuff
#include <array>
#include <list>
#include <memory>
#include <atomic>
#include <memory>
namespace XrdCl
{
class PostMaster;
class SIDManager;
class URL;
class LocalFileHandler;
class Socket;
//----------------------------------------------------------------------------
// Single entry in the redirect-trace-back
//----------------------------------------------------------------------------
struct RedirectEntry
{
enum Type
{
EntryRedirect,
EntryRedirectOnWait,
EntryRetry,
EntryWait
};
RedirectEntry( const URL &from, const URL &to, Type type ) :
from( from ), to( to ), type( type )
{
}
URL from;
URL to;
Type type;
XRootDStatus status;
std::string ToString( bool prevok = true )
{
const std::string tostr = to.GetLocation();
const std::string fromstr = from.GetLocation();
if( prevok )
{
switch( type )
{
case EntryRedirect: return "Redirected from: " + fromstr + " to: "
+ tostr;
case EntryRedirectOnWait: return "Server responded with wait. "
"Falling back to virtual redirector: " + tostr;
case EntryRetry: return "Retrying: " + tostr;
case EntryWait: return "Waited at server request. Resending: "
+ tostr;
}
}
return "Failed at: " + fromstr + ", retrying at: " + tostr;
}
};
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
class XRootDMsgHandler: public MsgHandler
{
friend class HandleRspJob;
public:
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDMsgHandler( Message *msg,
ResponseHandler *respHandler,
const URL *url,
std::shared_ptr<SIDManager> sidMgr,
LocalFileHandler *lFileHandler):
pRequest( msg ),
pResponseHandler( respHandler ),
pUrl( *url ),
pEffectiveDataServerUrl( 0 ),
pSidMgr( sidMgr ),
pLFileHandler( lFileHandler ),
pExpiration( 0 ),
pRedirectAsAnswer( false ),
pOksofarAsAnswer( false ),
pHasLoadBalancer( false ),
pHasSessionId( false ),
pChunkList( 0 ),
pKBuff( 0 ),
pRedirectCounter( 0 ),
pNotAuthorizedCounter( 0 ),
pAsyncOffset( 0 ),
pAsyncChunkIndex( 0 ),
pPgWrtCksumBuff( 4 ),
pPgWrtCurrentPageOffset( 0 ),
pPgWrtCurrentPageNb( 0 ),
pOtherRawStarted( false ),
pFollowMetalink( false ),
pStateful( false ),
pAggregatedWaitTime( 0 ),
pMsgInFly( false ),
pSendingState( 0 ),
pTimeoutFence( false ),
pDirListStarted( false ),
pDirListWithStat( false ),
pCV( 0 ),
pSslErrCnt( 0 )
{
pPostMaster = DefaultEnv::GetPostMaster();
if( msg->GetSessionId() )
pHasSessionId = true;
Log *log = DefaultEnv::GetLog();
log->Debug( ExDbgMsg, "[%s] MsgHandler created: %p (message: %s ).",
pUrl.GetHostId().c_str(), (void*)this,
pRequest->GetObfuscatedDescription().c_str() );
ClientRequestHdr *hdr = (ClientRequestHdr*)pRequest->GetBuffer();
if( ntohs( hdr->requestid ) == kXR_pgread )
{
ClientPgReadRequest *pgrdreq = (ClientPgReadRequest*)pRequest->GetBuffer();
pCrc32cDigests.reserve( XrdOucPgrwUtils::csNum( ntohll( pgrdreq->offset ),
ntohl( pgrdreq->rlen ) ) );
}
//----------------------------------------------------------------------
// Pass the reader our pUrl, not *url. The latter is a reference, likely
// from FileStateHandler such as *pDataServer. Accessing that throughout
// our lifetime may lead to concurrent access. In the case of read-
// recovery the FileStateHandler may entirely reallocate the url object.
//----------------------------------------------------------------------
if( ntohs( hdr->requestid ) == kXR_readv )
pBodyReader.reset( new AsyncVectorReader( pUrl, *pRequest ) );
else if( ntohs( hdr->requestid ) == kXR_read )
pBodyReader.reset( new AsyncRawReader( pUrl, *pRequest ) );
else
pBodyReader.reset( new AsyncDiscardReader( pUrl, *pRequest ) );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
~XRootDMsgHandler()
{
DumpRedirectTraceBack();
if( !pHasSessionId )
delete pRequest;
delete pEffectiveDataServerUrl;
pRequest = reinterpret_cast<Message*>( 0xDEADBEEF );
pResponseHandler = reinterpret_cast<ResponseHandler*>( 0xDEADBEEF );
pPostMaster = reinterpret_cast<PostMaster*>( 0xDEADBEEF );
pLFileHandler = reinterpret_cast<LocalFileHandler*>( 0xDEADBEEF );
pChunkList = reinterpret_cast<ChunkList*>( 0xDEADBEEF );
pEffectiveDataServerUrl = reinterpret_cast<URL*>( 0xDEADBEEF );
Log *log = DefaultEnv::GetLog();
log->Debug( ExDbgMsg, "[%s] Destroying MsgHandler: %p.",
pUrl.GetHostId().c_str(), (void*)this );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual uint16_t Examine( std::shared_ptr<Message> &msg ) override;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual uint16_t InspectStatusRsp() override;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual uint16_t GetSid() const override;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual void Process() override;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual XRootDStatus ReadMessageBody( Message *msg,
Socket *socket,
uint32_t &bytesRead ) override;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual uint8_t OnStreamEvent( StreamEvent event,
XRootDStatus status ) override;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual void OnStatusReady( const Message *message,
XRootDStatus status ) override;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
virtual bool IsRaw() const override;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus WriteMessageBody( Socket *socket,
uint32_t &bytesWritten ) override;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void WaitDone( time_t now );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void SetExpiration( time_t expiration )
{
pExpiration = expiration;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
time_t GetExpiration() override
{
return pExpiration;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void SetRedirectAsAnswer( bool redirectAsAnswer )
{
pRedirectAsAnswer = redirectAsAnswer;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void SetOksofarAsAnswer( bool oksofarAsAnswer )
{
pOksofarAsAnswer = oksofarAsAnswer;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
const Message *GetRequest() const
{
return pRequest;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void SetLoadBalancer( const HostInfo &loadBalancer )
{
if( !loadBalancer.url.IsValid() )
return;
pLoadBalancer = loadBalancer;
pHasLoadBalancer = true;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void SetHostList( HostList *hostList )
{
pHosts.reset( hostList );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void SetChunkList( ChunkList *chunkList )
{
pChunkList = chunkList;
if( pBodyReader )
pBodyReader->SetChunkList( chunkList );
if( chunkList )
pChunkStatus.resize( chunkList->size() );
else
pChunkStatus.clear();
}
void SetCrc32cDigests( std::vector<uint32_t> && crc32cDigests )
{
pCrc32cDigests = std::move( crc32cDigests );
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void SetKernelBuffer( XrdSys::KernelBuffer *kbuff )
{
pKBuff = kbuff;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void SetRedirectCounter( uint16_t redirectCounter )
{
pRedirectCounter = redirectCounter;
}
void SetFollowMetalink( bool followMetalink )
{
pFollowMetalink = followMetalink;
}
void SetStateful( bool stateful )
{
pStateful = stateful;
}
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void PartialReceived();
void OnReadyToSend( [[maybe_unused]] Message *msg ) override
{
pSendingState |= kSawReadySend;
}
private:
// bit flags used with pSendingState
static constexpr int kSendDone = 0x0001;
static constexpr int kSawResp = 0x0002;
static constexpr int kFinalResp = 0x0004;
static constexpr int kSawReadySend = 0x0008;
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleError( XRootDStatus status );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Status RetryAtServer( const URL &url, RedirectEntry::Type entryType );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleResponse();
//------------------------------------------------------------------------
//------------------------------------------------------------------------
XRootDStatus *ProcessStatus();
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Status ParseResponse( AnyObject *&response );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Status ParseXAttrResponse( char *data, size_t len, AnyObject *&response );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Status RewriteRequestRedirect( const URL &newUrl );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Status RewriteRequestWait();
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void UpdateTriedCGI(uint32_t errNo=0);
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void SwitchOnRefreshFlag();
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleRspOrQueue();
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void HandleLocalRedirect( URL *url );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
bool IsRetriable();
//------------------------------------------------------------------------
//------------------------------------------------------------------------
bool OmitWait( Message &request, const URL &url );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
bool RetriableErrorResponse( const Status &status );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
void DumpRedirectTraceBack();
//------------------------------------------------------------------------
template<typename T>
Status ReadFromBuffer( char *&buffer, size_t &buflen, T& result );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Status ReadFromBuffer( char *&buffer, size_t &buflen, std::string &result );
//------------------------------------------------------------------------
//------------------------------------------------------------------------
Status ReadFromBuffer( char *&buffer, size_t &buflen, size_t size,
std::string &result );
//------------------------------------------------------------------------
// Helper struct for async reading of chunks
//------------------------------------------------------------------------
struct ChunkStatus
{
ChunkStatus(): sizeError( false ), done( false ) {}
bool sizeError;
bool done;
};
typedef std::list<std::unique_ptr<RedirectEntry>> RedirectTraceBack;
static const size_t CksumSize = sizeof( uint32_t );
static const size_t PageWithCksum = XrdSys::PageSize + CksumSize;
static const size_t MaxSslErrRetry = 3;
inline static size_t NbPgPerRsp( uint64_t offset, uint32_t dlen )
{
uint32_t pgcnt = 0;
uint32_t remainder = offset % XrdSys::PageSize;
if( remainder > 0 )
{
// account for the first unaligned page
++pgcnt;
// the size of the 1st unaligned page
uint32_t _1stpg = XrdSys::PageSize - remainder;
if( _1stpg + CksumSize > dlen )
_1stpg = dlen - CksumSize;
dlen -= _1stpg + CksumSize;
}
pgcnt += dlen / PageWithCksum;
if( dlen % PageWithCksum )
++ pgcnt;
return pgcnt;
}
Message *pRequest;
std::shared_ptr<Message> pResponse; //< the ownership is shared with MsgReader
std::vector<std::shared_ptr<Message>> pPartialResps; //< the ownership is shared with MsgReader
ResponseHandler *pResponseHandler;
URL pUrl;
URL *pEffectiveDataServerUrl;
PostMaster *pPostMaster;
std::shared_ptr<SIDManager> pSidMgr;
LocalFileHandler *pLFileHandler;
XRootDStatus pStatus;
Status pLastError;
time_t pExpiration;
bool pRedirectAsAnswer;
bool pOksofarAsAnswer;
std::unique_ptr<HostList> pHosts;
bool pHasLoadBalancer;
HostInfo pLoadBalancer;
bool pHasSessionId;
std::string pRedirectUrl;
ChunkList *pChunkList;
std::vector<uint32_t> pCrc32cDigests;
XrdSys::KernelBuffer *pKBuff;
std::vector<ChunkStatus> pChunkStatus;
uint16_t pRedirectCounter;
uint16_t pNotAuthorizedCounter;
uint32_t pAsyncOffset;
uint32_t pAsyncChunkIndex;
std::unique_ptr<AsyncPageReader> pPageReader;
std::unique_ptr<AsyncRawReaderIntfc> pBodyReader;
Buffer pPgWrtCksumBuff;
uint32_t pPgWrtCurrentPageOffset;
uint32_t pPgWrtCurrentPageNb;
bool pOtherRawStarted;
bool pFollowMetalink;
bool pStateful;
int pAggregatedWaitTime;
std::unique_ptr<RedirectEntry> pRdirEntry;
RedirectTraceBack pRedirectTraceBack;
bool pMsgInFly;
std::atomic<int> pSendingState;
//------------------------------------------------------------------------
// true if MsgHandler is both in inQueue and installed in respective
// Stream (this could happen if server gave oksofar response), otherwise
// false
//------------------------------------------------------------------------
std::atomic<bool> pTimeoutFence;
//------------------------------------------------------------------------
// if we are serving chunked data to the user's handler in case of
// kXR_dirlist we need to memorize if the response contains stat info or
// not (the information is only encoded in the first chunk)
//------------------------------------------------------------------------
bool pDirListStarted;
bool pDirListWithStat;
//------------------------------------------------------------------------
// synchronization is needed in case the MsgHandler has been configured
// to serve kXR_oksofar as a response to the user's handler
//------------------------------------------------------------------------
XrdSysCondVar pCV;
//------------------------------------------------------------------------
// Count of consecutive `errTlsSslError` errors
//------------------------------------------------------------------------
size_t pSslErrCnt;
};
}
#endif // __XRD_CL_XROOTD_MSG_HANDLER_HH__
XProtocol.hh
ClientPgReadRequest::rlen
kXR_int32 rlen
Definition XProtocol.hh:511
ClientRequestHdr::requestid
kXR_unt16 requestid
Definition XProtocol.hh:157
kXR_read
@ kXR_read
Definition XProtocol.hh:125
kXR_readv
@ kXR_readv
Definition XProtocol.hh:137
kXR_pgread
@ kXR_pgread
Definition XProtocol.hh:142
ClientPgReadRequest::offset
kXR_int64 offset
Definition XProtocol.hh:510
ClientPgReadRequest
Definition XProtocol.hh:506
ClientRequestHdr
Definition XProtocol.hh:155
XrdClAsyncDiscardReader.hh
XrdClAsyncPageReader.hh
XrdClAsyncRawReaderIntfc.hh
XrdClAsyncRawReader.hh
XrdClAsyncVectorReader.hh
XrdClConstants.hh
XrdClDefaultEnv.hh
XrdClLog.hh
XrdClMessage.hh
XrdClPostMasterInterfaces.hh
XrdClXRootDResponses.hh
XrdOucPgrwUtils.hh
XrdOucUtils.hh
XrdSysKernelBuffer.hh
XrdSysPageSize.hh
XrdSysPlatform.hh
XrdSysPthread.hh
XrdCl::AnyObject
Definition XrdClAnyObject.hh:33
XrdCl::AsyncDiscardReader
Object for discarding data.
Definition XrdClAsyncDiscardReader.hh:36
XrdCl::AsyncRawReader
Object for reading out data from the kXR_read response.
Definition XrdClAsyncRawReader.hh:35
XrdCl::AsyncVectorReader
Object for reading out data from the VectorRead response.
Definition XrdClAsyncVectorReader.hh:33
XrdCl::DefaultEnv::GetLog
static Log * GetLog()
Get default log.
Definition XrdClDefaultEnv.cc:493
XrdCl::DefaultEnv::GetPostMaster
static PostMaster * GetPostMaster()
Get default post master.
Definition XrdClDefaultEnv.cc:453
XrdCl::LocalFileHandler
Definition XrdClLocalFileHandler.hh:33
XrdCl::Log
Handle diagnostics.
Definition XrdClLog.hh:101
XrdCl::Log::Debug
void Debug(uint64_t topic, const char *format,...)
Print a debug message.
Definition XrdClLog.cc:282
XrdCl::Message
The message representation used throughout the system.
Definition XrdClMessage.hh:32
XrdCl::Message::GetSessionId
uint64_t GetSessionId() const
Get the session ID the message is meant for.
Definition XrdClMessage.hh:122
XrdCl::MsgHandler
Message handler.
Definition XrdClPostMasterInterfaces.hh:51
XrdCl::MsgHandler::StreamEvent
StreamEvent
Events that may have occurred to the stream.
Definition XrdClPostMasterInterfaces.hh:79
XrdCl::PostMaster
A hub for dispatching and receiving messages.
Definition XrdClPostMaster.hh:48
XrdCl::ResponseHandler
Handle an async response.
Definition XrdClXRootDResponses.hh:1127
XrdCl::SIDManager
Handle XRootD stream IDs.
Definition XrdClSIDManager.hh:43
XrdCl::Socket
A network socket.
Definition XrdClSocket.hh:43
XrdCl::URL
URL representation.
Definition XrdClURL.hh:31
XrdCl::URL::IsValid
bool IsValid() const
Is the url valid.
Definition XrdClURL.cc:452
XrdCl::XRootDMsgHandler::SetRedirectCounter
void SetRedirectCounter(uint16_t redirectCounter)
Set the redirect counter.
Definition XrdClXRootDMsgHandler.hh:417
XrdCl::XRootDMsgHandler::SetFollowMetalink
void SetFollowMetalink(bool followMetalink)
Definition XrdClXRootDMsgHandler.hh:422
XrdCl::XRootDMsgHandler::SetChunkList
void SetChunkList(ChunkList *chunkList)
Set the chunk list.
Definition XrdClXRootDMsgHandler.hh:390
XrdCl::XRootDMsgHandler::SetHostList
void SetHostList(HostList *hostList)
Set host list.
Definition XrdClXRootDMsgHandler.hh:382
XrdCl::XRootDMsgHandler::InspectStatusRsp
virtual uint16_t InspectStatusRsp() override
Definition XrdClXRootDMsgHandler.cc:315
XrdCl::XRootDMsgHandler::HandleRspJob
friend class HandleRspJob
Definition XrdClXRootDMsgHandler.hh:121
XrdCl::XRootDMsgHandler::OnStatusReady
virtual void OnStatusReady(const Message *message, XRootDStatus status) override
The requested action has been performed and the status is available.
Definition XrdClXRootDMsgHandler.cc:921
XrdCl::XRootDMsgHandler::SetCrc32cDigests
void SetCrc32cDigests(std::vector< uint32_t > &&crc32cDigests)
Definition XrdClXRootDMsgHandler.hh:401
XrdCl::XRootDMsgHandler::GetRequest
const Message * GetRequest() const
Get the request pointer.
Definition XrdClXRootDMsgHandler.hh:363
XrdCl::XRootDMsgHandler::SetLoadBalancer
void SetLoadBalancer(const HostInfo &loadBalancer)
Set the load balancer.
Definition XrdClXRootDMsgHandler.hh:371
XrdCl::XRootDMsgHandler::Examine
virtual uint16_t Examine(std::shared_ptr< Message > &msg) override
Definition XrdClXRootDMsgHandler.cc:109
XrdCl::XRootDMsgHandler::OnReadyToSend
void OnReadyToSend(Message *msg) override
Definition XrdClXRootDMsgHandler.hh:439
XrdCl::XRootDMsgHandler::XRootDMsgHandler
XRootDMsgHandler(Message *msg, ResponseHandler *respHandler, const URL *url, std::shared_ptr< SIDManager > sidMgr, LocalFileHandler *lFileHandler)
Definition XrdClXRootDMsgHandler.hh:134
XrdCl::XRootDMsgHandler::PartialReceived
void PartialReceived()
Definition XrdClXRootDMsgHandler.cc:1158
XrdCl::XRootDMsgHandler::~XRootDMsgHandler
~XRootDMsgHandler()
Destructor.
Definition XrdClXRootDMsgHandler.hh:216
XrdCl::XRootDMsgHandler::WaitDone
void WaitDone(time_t now)
Definition XrdClXRootDMsgHandler.cc:1150
XrdCl::XRootDMsgHandler::Process
virtual void Process() override
Process the message if it was "taken" by the examine action.
Definition XrdClXRootDMsgHandler.cc:414
XrdCl::XRootDMsgHandler::ReadMessageBody
virtual XRootDStatus ReadMessageBody(Message *msg, Socket *socket, uint32_t &bytesRead) override
Definition XrdClXRootDMsgHandler.cc:902
XrdCl::XRootDMsgHandler::SetStateful
void SetStateful(bool stateful)
Definition XrdClXRootDMsgHandler.hh:427
XrdCl::XRootDMsgHandler::SetOksofarAsAnswer
void SetOksofarAsAnswer(bool oksofarAsAnswer)
Definition XrdClXRootDMsgHandler.hh:355
XrdCl::XRootDMsgHandler::GetExpiration
time_t GetExpiration() override
Get a timestamp after which we give up.
Definition XrdClXRootDMsgHandler.hh:337
XrdCl::XRootDMsgHandler::WriteMessageBody
XRootDStatus WriteMessageBody(Socket *socket, uint32_t &bytesWritten) override
Definition XrdClXRootDMsgHandler.cc:1001
XrdCl::XRootDMsgHandler::SetKernelBuffer
void SetKernelBuffer(XrdSys::KernelBuffer *kbuff)
Set the kernel buffer.
Definition XrdClXRootDMsgHandler.hh:409
XrdCl::XRootDMsgHandler::OnStreamEvent
virtual uint8_t OnStreamEvent(StreamEvent event, XRootDStatus status) override
Definition XrdClXRootDMsgHandler.cc:882
XrdCl::XRootDMsgHandler::GetSid
virtual uint16_t GetSid() const override
Definition XrdClXRootDMsgHandler.cc:405
XrdCl::XRootDMsgHandler::SetExpiration
void SetExpiration(time_t expiration)
Set a timestamp after which we give up.
Definition XrdClXRootDMsgHandler.hh:329
XrdCl::XRootDMsgHandler::IsRaw
virtual bool IsRaw() const override
Are we a raw writer or not?
Definition XrdClXRootDMsgHandler.cc:981
XrdCl::XRootDMsgHandler::SetRedirectAsAnswer
void SetRedirectAsAnswer(bool redirectAsAnswer)
Definition XrdClXRootDMsgHandler.hh:346
XrdCl::XRootDStatus
Request status.
Definition XrdClXRootDResponses.hh:219
XrdOucPgrwUtils::csNum
static int csNum(off_t offs, int count)
Compute the required size of a checksum vector based on offset & length.
Definition XrdOucPgrwUtils.cc:109
XrdSys::KernelBuffer
Definition XrdSysKernelBuffer.hh:46
XrdCl
Definition XrdClAction.hh:34
XrdCl::HostList
std::vector< HostInfo > HostList
Definition XrdClXRootDResponses.hh:1121
XrdCl::ExDbgMsg
const uint64_t ExDbgMsg
Definition XrdClConstants.hh:44
XrdCl::ChunkList
std::vector< ChunkInfo > ChunkList
List of chunks.
Definition XrdClXRootDResponses.hh:1056
XrdSys::PageSize
static const int PageSize
Definition XrdSysPageSize.hh:36
XrdCl::HostInfo
Definition XrdClXRootDResponses.hh:1110
XrdCl::HostInfo::url
URL url
URL of the host.
Definition XrdClXRootDResponses.hh:1118
XrdCl::RedirectEntry::type
Type type
Definition XrdClXRootDMsgHandler.hh:88
XrdCl::RedirectEntry::RedirectEntry
RedirectEntry(const URL &from, const URL &to, Type type)
Definition XrdClXRootDMsgHandler.hh:80
XrdCl::RedirectEntry::status
XRootDStatus status
Definition XrdClXRootDMsgHandler.hh:89
XrdCl::RedirectEntry::from
URL from
Definition XrdClXRootDMsgHandler.hh:86
XrdCl::RedirectEntry::ToString
std::string ToString(bool prevok=true)
Definition XrdClXRootDMsgHandler.hh:91
XrdCl::RedirectEntry::to
URL to
Definition XrdClXRootDMsgHandler.hh:87
XrdCl::RedirectEntry::Type
Type
Definition XrdClXRootDMsgHandler.hh:73
XrdCl::RedirectEntry::EntryRedirect
@ EntryRedirect
Definition XrdClXRootDMsgHandler.hh:74
XrdCl::RedirectEntry::EntryRetry
@ EntryRetry
Definition XrdClXRootDMsgHandler.hh:76
XrdCl::RedirectEntry::EntryRedirectOnWait
@ EntryRedirectOnWait
Definition XrdClXRootDMsgHandler.hh:75
XrdCl::RedirectEntry::EntryWait
@ EntryWait
Definition XrdClXRootDMsgHandler.hh:77
XrdCl::Status
Procedure execution status.
Definition XrdClStatus.hh:115