#include <XrdSfsDio.hh>
XrdSfsDio.hh
This class is used to define specialized I/O interfaces that can be provided to the underlying filesystem. This object is normally passed via the read() call should fctl() indicate this interface is to be used.
◆ XrdSfsDio()
Constructor and destructor.
◆ ~XrdSfsDio()
virtual XrdSfsDio::~XrdSfsDio |
( |
| ) |
|
|
inlinevirtual |
◆ SendFile() [1/2]
virtual int XrdSfsDio::SendFile |
( |
int |
fildes | ) |
|
|
pure virtual |
Send data to a client using the sendfile() system interface.
- Parameters
-
fildes | - The file descriptor to use to effect a sendfile() for all of the requested data. The original offset and length are used relative to this file descriptor. |
- Returns
- >0 - data has been sent in a previous call. This is indicative of a logic error in SendData() as only one call is allowed.
-
=0 - data has been sent.
-
<0 - A fatal transmission error occurred. SendData() should return SFS_ERROR to force the connection to be closed.
Implemented in XrdXrootdProtocol.
◆ SendFile() [2/2]
virtual int XrdSfsDio::SendFile |
( |
XrdOucSFVec * |
sfvec, |
|
|
int |
sfvnum |
|
) |
| |
|
pure virtual |
Send data to a client using the sendfile() system interface.
- Parameters
-
sfvec | - One or more XrdOucSFVec elements describing what should be transferred. The first element of the vector must be available for use by the interface for proper framing. That is, start filling in elements at sfvec[1] and sfvnum should be the count of elements filled in plus 1. |
sfvnum | - total number of elements in sfvec and includes the first unused element. There is a maximum number of elements that the vector may have; defined inside XrdOucSFVec. |
- Returns
- >0 - either data has been sent in a previous call or the total amount of data in sfvec is greater than the original request. This is indicative of a SendData() logic error.
-
=0 - data has been sent.
-
<0 - A fatal transmission error occurred. SendData() should return SFS_ERROR to force the connection to be closed.
Implemented in XrdXrootdProtocol.
◆ SetFD()
virtual void XrdSfsDio::SetFD |
( |
int |
fildes | ) |
|
|
pure virtual |
Change the file descriptor setting and, consequently, interface processing.
- Parameters
-
fildes | - The file descriptor to use in the future, as follows: < 0 - Disable sendfile and always use read(). >= 0 - Enable sendfile and always use sendfile() w/o invoking this interface (i.e. fast path). |
Implemented in XrdXrootdProtocol.
The documentation for this class was generated from the following file: