19 #ifndef SRC_XRDCL_XRDCLASYNCRAWREADER_HH_
20 #define SRC_XRDCL_XRDCLASYNCRAWREADER_HH_
67 chlen = ( *chunks )[0].length;
87 char *buff =
static_cast<char*
>( ( *chunks )[
chidx].buffer );
137 "response to %s: user supplied buffer is "
138 "too small for the received data.",
176 std::unique_ptr<AnyObject> rsp(
new AnyObject() );
178 rsp->Set( GetVectorReadInfo() );
180 rsp->Set( GetChunkInfo() );
181 response = rsp.release();
194 inline VectorReadInfo* GetVectorReadInfo()
196 VectorReadInfo *info =
new VectorReadInfo();
199 for(
auto &chunk : *
chunks )
201 int length = uint32_t( btsleft ) >= chunk.length ? chunk.length : btsleft;
202 info->GetChunks().emplace_back( chunk.offset, length, chunk.buffer );
Base class for any message's body reader.
XRootDStatus ReadBytesAsync(Socket &socket, char *buffer, uint32_t toBeRead, uint32_t &bytesRead)
Object for reading out data from the kXR_read response.
XRootDStatus Read(Socket &socket, uint32_t &btsret)
XRootDStatus GetResponse(AnyObject *&response)
Get the response.
AsyncRawReader(const URL &url, const Message &request)
static Log * GetLog()
Get default log.
void Error(uint64_t topic, const char *format,...)
Report an error.
The message representation used throughout the system.
const std::string & GetObfuscatedDescription() const
Get the description of the message with authz parameter obfuscated.
uint16_t GetVirtReqID() const
Get virtual request ID for the message.
std::string GetHostId() const
Get the host part of the URL (user:password@host:port)
const uint16_t stError
An error occurred that could potentially be retried.
const uint16_t errInternal
Internal error.
const uint16_t errInvalidResponse
const uint16_t errCorruptedHeader
Describe a data chunk for vector read.
uint32_t length
offset in the file
Procedure execution status.
uint16_t code
Error type, or additional hints on what to do.
bool IsOK() const
We're fine.