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.",
139 url.GetHostId().c_str(),
140 request.GetObfuscatedDescription().c_str() );
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 );
XRootDStatus ReadBytesAsync(Socket &socket, char *buffer, uint32_t toBeRead, uint32_t &bytesRead)
AsyncRawReaderIntfc(const URL &url, const Message &request)
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 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.