#include <XrdSfsDio.hh>
Public Member Functions | |
virtual int | SendFile (int fildes)=0 |
virtual int | SendFile (XrdOucSFVec *sfvec, int sfvnum)=0 |
virtual void | SetFD (int fildes)=0 |
XrdSfsDio () | |
Constructor and destructor. | |
virtual | ~XrdSfsDio () |
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::XrdSfsDio | ( | ) | [inline] |
Constructor and destructor.
virtual XrdSfsDio::~XrdSfsDio | ( | ) | [inline, virtual] |
virtual int XrdSfsDio::SendFile | ( | XrdOucSFVec * | sfvec, | |
int | sfvnum | |||
) | [pure virtual] |
Send data to a client using the sendfile() system interface.
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. |
Implemented in XrdXrootdProtocol.
virtual int XrdSfsDio::SendFile | ( | int | fildes | ) | [pure virtual] |
Send data to a client using the sendfile() system interface.
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. |
Implemented in XrdXrootdProtocol.
virtual void XrdSfsDio::SetFD | ( | int | fildes | ) | [pure virtual] |
Change the file descriptor setting and, consequently, interface processing.
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.