|
xrootd
|
Binary blob representation. More...
#include <XrdClBuffer.hh>

Public Member Functions | |
| Buffer (uint32_t size=0) | |
| Constructor. | |
| virtual | ~Buffer () |
| Destructor. | |
| const char * | GetBuffer (uint32_t offset=0) const |
| Get the message buffer. | |
| char * | GetBuffer (uint32_t offset=0) |
| Get the message buffer. | |
| void | ReAllocate (uint32_t size) |
| Reallocate the buffer to a new location of a given size. | |
| void | Free () |
| Free the buffer. | |
| void | Allocate (uint32_t size) |
| Allocate the buffer. | |
| void | Zero () |
| Zero. | |
| uint32_t | GetSize () const |
| Get the size of the message. | |
| uint32_t | GetCursor () const |
| Get append cursor. | |
| void | SetCursor (uint32_t cursor) |
| Set the cursor. | |
| void | AdvanceCursor (uint32_t delta) |
| Advance the cursor. | |
| void | Append (const char *buffer, uint32_t size) |
| Append data at the position pointed to by the append cursor. | |
| void | Append (const char *buffer, uint32_t size, uint32_t offset) |
| Append data at the given offset. | |
| char * | GetBufferAtCursor () |
| Get the buffer pointer at the append cursor. | |
| const char * | GetBufferAtCursor () const |
| Get the buffer pointer at the append cursor. | |
| void | FromString (const std::string str) |
| Fill the buffer from a string. | |
| std::string | ToString () const |
| Convert the buffer to a string. | |
| void | Grab (char *buffer, uint32_t size) |
| Grab a buffer allocated outside. | |
| char * | Release () |
| Release the buffer. | |
Private Attributes | |
| char * | pBuffer |
| uint32_t | pSize |
| uint32_t | pCursor |
Binary blob representation.
| XrdCl::Buffer::Buffer | ( | uint32_t | size = 0 | ) | [inline] |
Constructor.
References Allocate().
| virtual XrdCl::Buffer::~Buffer | ( | ) | [inline, virtual] |
Destructor.
References Free().
| void XrdCl::Buffer::AdvanceCursor | ( | uint32_t | delta | ) | [inline] |
Advance the cursor.
References pCursor.
Referenced by XrdCl::XRootDTransport::GetBody(), XrdCl::XRootDTransport::GetHeader(), and XrdCl::AsyncSocketHandler::WriteCurrentMessage().
| void XrdCl::Buffer::Allocate | ( | uint32_t | size | ) | [inline] |
Allocate the buffer.
References pBuffer, and pSize.
Referenced by Buffer(), XrdCl::XRootDTransport::GenerateInitialHS(), XrdCl::XRootDTransport::GenerateInitialHSProtocol(), XrdCl::XRootDTransport::GetHeader(), XrdCl::XRootDMsgHandler::ParseResponse(), and TestThreadFunc().
| void XrdCl::Buffer::Append | ( | const char * | buffer, |
| uint32_t | size | ||
| ) | [inline] |
Append data at the position pointed to by the append cursor.
References pBuffer, pCursor, pSize, and ReAllocate().
Referenced by XrdCl::FileSystem::ChMod(), XrdCl::FileSystem::DirList(), XrdCl::FileSystem::Locate(), XrdCl::FileSystem::MkDir(), XrdCl::FileSystem::Mv(), XrdCl::FileStateHandler::Open(), XrdCl::XRootDMsgHandler::ParseResponse(), XrdCl::FileSystem::Prepare(), XrdCl::XRootDMsgHandler::Process(), XrdCl::FileSystem::Query(), XrdCl::FileStateHandler::ReOpenFileAtServer(), XrdCl::FileSystem::Rm(), XrdCl::FileSystem::RmDir(), XrdCl::FileSystem::SendInfo(), XrdCl::FileStateHandler::Stat(), XrdCl::FileSystem::Stat(), XrdCl::FileSystem::StatVFS(), and XrdCl::FileSystem::Truncate().
| void XrdCl::Buffer::Append | ( | const char * | buffer, |
| uint32_t | size, | ||
| uint32_t | offset | ||
| ) | [inline] |
Append data at the given offset.
References pBuffer, pSize, and ReAllocate().
| void XrdCl::Buffer::Free | ( | ) | [inline] |
| void XrdCl::Buffer::FromString | ( | const std::string | str | ) | [inline] |
Fill the buffer from a string.
References pBuffer, and ReAllocate().
Referenced by XrdCl::Utils::CheckTPC(), DoQuery(), XrdCl::Utils::GetRemoteCheckSum(), and FileSystemTest::ServerQueryTest().
| const char* XrdCl::Buffer::GetBuffer | ( | uint32_t | offset = 0 | ) | const [inline] |
Get the message buffer.
References pBuffer.
Referenced by XrdCl::MessageUtils::AppendCGI(), XrdCl::MessageUtils::CreateRequest(), XrdCl::XRootDTransport::DoAuthentication(), XrdCl::XRootDMsgHandler::Examine(), XrdFilter::Filter(), XrdCl::XRootDTransport::GenerateBind(), XrdCl::XRootDTransport::GenerateInitialHS(), XrdCl::XRootDTransport::GenerateInitialHSProtocol(), XrdCl::XRootDTransport::GenerateLogIn(), XrdCl::XRootDTransport::GetBody(), GetBufferAtCursor(), XrdCl::XRootDMsgHandler::HandleResponse(), XrdCl::XRootDMsgHandler::IsRaw(), XrdCl::XRootDTransport::LogErrorResponse(), XrdCl::XRootDTransport::MarshallRequest(), XrdCl::XRootDTransport::MultiplexSubStream(), XrdCl::FileSystem::Mv(), XrdCl::FileStateHandler::OnStateError(), XrdCl::FileStateHandler::OnStateResponse(), XrdCl::XRootDMsgHandler::ParseResponse(), XrdCl::XRootDMsgHandler::Process(), XrdCl::XRootDTransport::ProcessBindResp(), XrdCl::XRootDTransport::ProcessLogInResp(), XrdCl::XRootDTransport::ProcessProtocolResp(), XrdCl::XRootDTransport::ProcessServerHS(), XrdCl::XRootDMsgHandler::ProcessStatus(), XrdCl::FileSystem::Query(), XrdCl::XRootDMsgHandler::ReadMessageBody(), XrdCl::FileStateHandler::ReWriteFileHandle(), XrdCl::XRootDMsgHandler::RewriteRequestRedirect(), XrdCl::XRootDMsgHandler::RewriteRequestWait(), XrdCl::MessageUtils::SendMessage(), XrdCl::XRootDTransport::SetDescription(), XrdCl::XRootDTransport::StreamAction(), XrdCl::XRootDMsgHandler::SwitchOnRefreshFlag(), TestThreadFunc(), XrdCl::XRootDTransport::UnMarshallBody(), XrdCl::XRootDTransport::UnMarshallHeader(), XrdCl::XRootDTransport::UnMarshallRequest(), XrdCl::XRootDMsgHandler::UnPackReadVResponse(), and XrdCl::FileStateHandler::VectorRead().
| char* XrdCl::Buffer::GetBuffer | ( | uint32_t | offset = 0 | ) | [inline] |
Get the message buffer.
References pBuffer.
| char* XrdCl::Buffer::GetBufferAtCursor | ( | ) | [inline] |
Get the buffer pointer at the append cursor.
References GetBuffer(), and pCursor.
Referenced by XrdCl::XRootDTransport::GetBody(), XrdCl::XRootDTransport::GetHeader(), and XrdCl::AsyncSocketHandler::WriteCurrentMessage().
| const char* XrdCl::Buffer::GetBufferAtCursor | ( | ) | const [inline] |
Get the buffer pointer at the append cursor.
References GetBuffer(), and pCursor.
| uint32_t XrdCl::Buffer::GetCursor | ( | ) | const [inline] |
Get append cursor.
References pCursor.
Referenced by XrdCl::XRootDTransport::GetBody(), XrdCl::XRootDTransport::GetHeader(), XrdCl::AsyncSocketHandler::OnRead(), XrdCl::AsyncSocketHandler::ReadMessage(), and XrdCl::AsyncSocketHandler::WriteCurrentMessage().
| uint32_t XrdCl::Buffer::GetSize | ( | ) | const [inline] |
Get the size of the message.
References pSize.
Referenced by XrdCl::XRootDMsgHandler::Examine(), XrdCl::XRootDTransport::GetHeader(), XrdCl::XRootDTransport::MultiplexSubStream(), XrdCl::AsyncSocketHandler::OnRead(), XrdCl::AsyncSocketHandler::OnWrite(), XrdCl::XRootDMsgHandler::ParseResponse(), XrdCl::XRootDMsgHandler::PostProcessReadV(), XrdCl::FileSystem::Query(), XrdCl::AsyncSocketHandler::ReadMessage(), TestThreadFunc(), XrdCl::XRootDMsgHandler::UnPackReadVResponse(), and XrdCl::AsyncSocketHandler::WriteCurrentMessage().
| void XrdCl::Buffer::Grab | ( | char * | buffer, |
| uint32_t | size | ||
| ) | [inline] |
| void XrdCl::Buffer::ReAllocate | ( | uint32_t | size | ) | [inline] |
Reallocate the buffer to a new location of a given size.
References pBuffer, and pSize.
Referenced by Append(), XrdCl::MessageUtils::AppendCGI(), FromString(), XrdCl::XRootDTransport::GetBody(), and XrdCl::XRootDTransport::MultiplexSubStream().
| char* XrdCl::Buffer::Release | ( | ) | [inline] |
| void XrdCl::Buffer::SetCursor | ( | uint32_t | cursor | ) | [inline] |
Set the cursor.
References pCursor.
Referenced by XrdCl::AsyncSocketHandler::OnWrite(), and XrdCl::AsyncSocketHandler::WriteCurrentMessage().
| std::string XrdCl::Buffer::ToString | ( | ) | const [inline] |
Convert the buffer to a string.
References pBuffer, and pSize.
Referenced by XrdCl::Utils::CheckTPC(), DoQuery(), and XrdCl::Utils::GetRemoteCheckSum().
| void XrdCl::Buffer::Zero | ( | ) | [inline] |
char* XrdCl::Buffer::pBuffer [private] |
Referenced by Allocate(), Append(), Free(), FromString(), GetBuffer(), Grab(), ReAllocate(), Release(), ToString(), and Zero().
uint32_t XrdCl::Buffer::pCursor [private] |
Referenced by AdvanceCursor(), Append(), Free(), GetBufferAtCursor(), GetCursor(), Release(), and SetCursor().
uint32_t XrdCl::Buffer::pSize [private] |
Referenced by Allocate(), Append(), Free(), GetSize(), Grab(), ReAllocate(), Release(), ToString(), and Zero().
1.7.6.1