![]() |
XRootD
|
Binary blob representation. More...
#include <XrdClBuffer.hh>
Public Member Functions | |
Buffer (Buffer &&buffer) | |
Move Constructor. More... | |
Buffer (uint32_t size=0) | |
Constructor. More... | |
virtual | ~Buffer () |
Destructor. More... | |
void | AdvanceCursor (uint32_t delta) |
Advance the cursor. More... | |
void | Allocate (uint32_t size) |
Allocate the buffer. More... | |
void | Append (const char *buffer, uint32_t size) |
Append data at the position pointed to by the append cursor. More... | |
void | Append (const char *buffer, uint32_t size, uint32_t offset) |
Append data at the given offset. More... | |
void | Free () |
Free the buffer. More... | |
void | FromString (const std::string str) |
Fill the buffer from a string. More... | |
char * | GetBuffer (uint32_t offset=0) |
Get the message buffer. More... | |
const char * | GetBuffer (uint32_t offset=0) const |
Get the message buffer. More... | |
char * | GetBufferAtCursor () |
Get the buffer pointer at the append cursor. More... | |
const char * | GetBufferAtCursor () const |
Get the buffer pointer at the append cursor. More... | |
uint32_t | GetCursor () const |
Get append cursor. More... | |
uint32_t | GetSize () const |
Get the size of the message. More... | |
void | Grab (char *buffer, uint32_t size) |
Grab a buffer allocated outside. More... | |
Buffer & | operator= (Buffer &&buffer) |
Move assignment operator. More... | |
void | ReAllocate (uint32_t size) |
Reallocate the buffer to a new location of a given size. More... | |
char * | Release () |
Release the buffer. More... | |
void | SetCursor (uint32_t cursor) |
Set the cursor. More... | |
std::string | ToString () const |
Convert the buffer to a string. More... | |
void | Zero () |
Zero. More... | |
Protected Member Functions | |
void | Steal (Buffer &&buffer) |
Binary blob representation.
Definition at line 33 of file XrdClBuffer.hh.
|
inline |
Constructor.
Definition at line 39 of file XrdClBuffer.hh.
References Allocate().
|
inline |
Move Constructor.
Definition at line 50 of file XrdClBuffer.hh.
References Steal().
|
inlinevirtual |
Destructor.
Definition at line 67 of file XrdClBuffer.hh.
References Free().
|
inline |
Advance the cursor.
Definition at line 156 of file XrdClBuffer.hh.
Referenced by XrdCl::XRootDTransport::GetBody(), XrdCl::XRootDTransport::GetHeader(), XrdCl::XRootDTransport::GetMore(), XrdEc::WrtBuff::Pad(), XrdCl::Socket::Send(), XrdEc::WrtBuff::Write(), and XrdCl::XRootDMsgHandler::WriteMessageBody().
|
inline |
Allocate the buffer.
Definition at line 110 of file XrdClBuffer.hh.
Referenced by Buffer(), XrdCl::XRootDTransport::GetHeader(), and XrdEc::WrtBuff::Pad().
|
inline |
Append data at the position pointed to by the append cursor.
Definition at line 164 of file XrdClBuffer.hh.
References ReAllocate().
Referenced by XrdCl::FileSystem::ChMod(), XrdCl::MessageUtils::CreateXAttrBody(), XrdCl::FileSystem::DirList(), XrdCl::FileStateHandler::Fcntl(), XrdCl::FileSystem::Locate(), XrdCl::FileSystem::MkDir(), XrdCl::FileSystem::Mv(), XrdCl::FileStateHandler::Open(), XrdCl::FileSystem::Prepare(), XrdCl::FileSystem::Query(), XrdCl::FileSystem::Rm(), XrdCl::FileSystem::RmDir(), XrdCl::FileSystem::Stat(), XrdCl::FileSystem::StatVFS(), and XrdCl::FileSystem::Truncate().
|
inline |
Append data at the given offset.
Definition at line 177 of file XrdClBuffer.hh.
References ReAllocate().
|
inline |
Free the buffer.
Definition at line 99 of file XrdClBuffer.hh.
Referenced by ~Buffer(), and Grab().
|
inline |
Fill the buffer from a string.
Definition at line 205 of file XrdClBuffer.hh.
References ReAllocate().
Referenced by XrdCl::Utils::CheckTPC(), XrdCl::Utils::CheckTPCLite(), XrdCl::EcHandler::Close(), DoQuery(), XrdCl::Utils::GetRemoteCheckSum(), XrdCl::FileSystemUtils::GetSpaceInfo(), XrdCl::Utils::GetSupportedCheckSums(), main(), and XrdPosixAdmin::Query().
|
inline |
Get the message buffer.
Definition at line 80 of file XrdClBuffer.hh.
|
inline |
Get the message buffer.
Definition at line 72 of file XrdClBuffer.hh.
Referenced by XrdEc::WrtBuff::WrtBuff(), XrdCl::XRootDMsgHandler::XRootDMsgHandler(), XrdCl::Utils::CheckEC(), XrdCl::FileStateHandler::ChkptWrt(), XrdCl::FileStateHandler::ChkptWrtV(), XrdCl::MessageUtils::CreateRequest(), XrdCl::MessageUtils::CreateXAttrBody(), XrdEc::WrtBuff::Encode(), XrdCl::XRootDMsgHandler::Examine(), XrdCl::LocalFileHandler::ExecRequest(), XrdCl::FileStateHandler::Fcntl(), XrdCl::XRootDTransport::GetBody(), GetBufferAtCursor(), XrdCl::XRootDTransport::GetHeader(), XrdCl::XRootDTransport::GetMore(), XrdCl::XRootDMsgHandler::GetSid(), XrdCl::XRootDTransport::GetSignature(), XrdCl::AsyncSocketHandler::HandleWaitRsp(), XrdCl::XRootDMsgHandler::InspectStatusRsp(), XrdCl::XRootDMsgHandler::IsRaw(), XrdCl::XRootDTransport::LogErrorResponse(), main(), XrdCl::XRootDTransport::MarshallRequest(), XrdCl::XRootDTransport::MessageReceived(), XrdCl::XRootDTransport::MessageSent(), XrdCl::XRootDTransport::MultiplexSubStream(), XrdCl::FileSystem::Mv(), XrdCl::FileStateHandler::OnStateError(), XrdCl::FileStateHandler::OnStateResponse(), XrdCl::LocalFileHandler::Open(), XrdEc::WrtBuff::Pad(), XrdCl::FileStateHandler::PgReadImpl(), XrdCl::XRootDMsgHandler::Process(), XrdCl::FileSystem::Query(), XrdPosixAdmin::Query(), XrdCl::XRootDMsgHandler::ReadMessageBody(), XrdCl::MessageUtils::RewriteCGIAndPath(), XrdCl::MessageUtils::SendMessage(), XrdCl::XRootDTransport::SetDescription(), XrdCl::XRootDTransport::UnMarchalStatusMore(), XrdCl::XRootDTransport::UnMarshallBody(), XrdCl::XRootDTransport::UnMarshallHeader(), XrdCl::XRootDTransport::UnMarshallRequest(), XrdCl::XRootDTransport::UnMarshalStatusBody(), XrdCl::FileStateHandler::VectorRead(), XrdCl::FileStateHandler::VectorWrite(), and XrdCl::XRootDMsgHandler::WriteMessageBody().
|
inline |
Get the buffer pointer at the append cursor.
Definition at line 189 of file XrdClBuffer.hh.
References GetBuffer().
Referenced by XrdCl::XRootDTransport::GetBody(), XrdCl::XRootDTransport::GetHeader(), XrdCl::XRootDTransport::GetMore(), XrdCl::Socket::Send(), XrdEc::WrtBuff::Write(), and XrdCl::XRootDMsgHandler::WriteMessageBody().
|
inline |
Get the buffer pointer at the append cursor.
Definition at line 197 of file XrdClBuffer.hh.
References GetBuffer().
|
inline |
Get append cursor.
Definition at line 140 of file XrdClBuffer.hh.
Referenced by XrdEc::WrtBuff::Complete(), XrdEc::WrtBuff::Empty(), XrdEc::WrtBuff::GetBlkSize(), XrdCl::XRootDTransport::GetBody(), XrdCl::XRootDTransport::GetHeader(), XrdCl::XRootDTransport::GetMore(), XrdEc::WrtBuff::GetStrpSize(), XrdCl::Socket::Send(), XrdEc::WrtBuff::Write(), and XrdCl::XRootDMsgHandler::WriteMessageBody().
|
inline |
Get the size of the message.
Definition at line 132 of file XrdClBuffer.hh.
Referenced by XrdEc::WrtBuff::WrtBuff(), XrdEc::WrtBuff::Empty(), XrdCl::FileStateHandler::Fcntl(), XrdCl::XRootDTransport::GetBody(), XrdCl::XRootDTransport::GetHeader(), XrdCl::XRootDTransport::GetMore(), XrdCl::XRootDTransport::MultiplexSubStream(), XrdEc::WrtBuff::Pad(), XrdCl::FileSystem::Query(), XrdPosixAdmin::Query(), XrdCl::Socket::Send(), XrdCl::FcntlAction::Serialize(), XrdCl::XRootDTransport::UnMarshalStatusBody(), and XrdCl::AsyncMsgWriter::Write().
|
inline |
Grab a buffer allocated outside.
Definition at line 228 of file XrdClBuffer.hh.
References Free().
Referenced by XrdCl::XRootDTransport::GetSignature().
Move assignment operator.
Definition at line 58 of file XrdClBuffer.hh.
References Steal().
|
inline |
Reallocate the buffer to a new location of a given size.
Definition at line 88 of file XrdClBuffer.hh.
Referenced by Append(), FromString(), XrdCl::XRootDTransport::GetBody(), XrdCl::XRootDTransport::GetMore(), XrdCl::XRootDTransport::MultiplexSubStream(), and XrdCl::MessageUtils::RewriteCGIAndPath().
|
inline |
Release the buffer.
Definition at line 238 of file XrdClBuffer.hh.
|
inline |
Set the cursor.
Definition at line 148 of file XrdClBuffer.hh.
Referenced by XrdEc::WrtBuff::Pad(), XrdCl::Socket::Send(), XrdCl::AsyncMsgWriter::Write(), and XrdCl::XRootDMsgHandler::WriteMessageBody().
|
inlineprotected |
Definition at line 249 of file XrdClBuffer.hh.
Referenced by Buffer(), operator=(), and XrdCl::Message::operator=().
|
inline |
Convert the buffer to a string.
Definition at line 215 of file XrdClBuffer.hh.
Referenced by XrdCl::Utils::CheckTPC(), XrdCl::Utils::CheckTPCLite(), DoCache(), DoPrepare(), DoQuery(), XrdCl::Utils::GetRemoteCheckSum(), XrdCl::FileSystemUtils::GetSpaceInfo(), XrdCl::Utils::GetSupportedCheckSums(), and main().
|
inline |
Zero.
Definition at line 124 of file XrdClBuffer.hh.
Referenced by XrdCl::Message::Message(), and XrdCl::MessageUtils::CreateRequest().