#include <XrdSfsXio.hh>
◆ XrdSfsXio()
Constructor and destructor
- Parameters
-
xioimpl | Reference to static method implementations. |
◆ ~XrdSfsXio()
virtual XrdSfsXio::~XrdSfsXio |
( |
| ) |
|
|
inlinevirtual |
Constructor and destructor.
◆ Buffer()
static char * XrdSfsXio::Buffer |
( |
XrdSfsXioHandle |
theHand, |
|
|
int * |
buffsz = 0 |
|
) |
| |
|
static |
Get the address and size of the buffer associated with a handle.
- Parameters
-
theHand | - The handle associated with the buffer. |
buffsz | - If not nil, the size of the buffer is returned. The size will always be >= to the original data length. |
- Returns
- A pointer to the buffer.
◆ Claim()
virtual XrdSfsXioHandle XrdSfsXio::Claim |
( |
const char * |
curBuff, |
|
|
int |
datasz, |
|
|
int |
minasz |
|
) |
| |
|
pure virtual |
Claim ownership of the current buffer if it is memory effecient to do so.
- Parameters
-
curBuff | - The address of the current buffer. It must match the the buffer that was most recently passed to the caller. |
datasz | - Number of useful bytes in the buffer (i.e. write size). |
minasz | - Minimum buffer size that would be allocated to copy data. |
- Returns
- !0 The buffer handle of the current buffer is returned along with ownership rights.
-
=0 Too much memory would be wasted by transferring ownership (errno == 0) or an error ocurred (errno != 0). When an error see Swap() below for possible types of errors.
Implemented in XrdXrootdProtocol.
◆ Reclaim()
Return a buffer previously gotten from a Claim() or Swap() call.
- Parameters
-
theHand | - The handle associated with the buffer. |
◆ Swap()
Swap the current I/O buffer
- Parameters
-
curBuff | - The address of the current buffer. It must match the the buffer that was most recently passed to the caller. |
oldHand | - The handle associated with a buffer returned by a previous call to Swap(). A value of zero indicates that the caller is taking control of the buffer but has no replacement buffer. |
- Returns
- !0 The buffer handle of the current buffer is returned along with ownership rights. If oldHand was not nil, the caller's ownership of the associated buffer is reclaimed.
-
=0 An error occurred and nothing has changed; errno holds the reason for the error. Typically, EINVAL - curBuff doe not match current buffer. ENOBUFS - not enough memory to give up buffer. ENOTSUP - unsupported context for call.
Implemented in XrdXrootdProtocol.
The documentation for this class was generated from the following file: