xrootd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
XrdXrootdTransSend Class Reference

#include <XrdXrootdTransSend.hh>

Inheritance diagram for XrdXrootdTransSend:
Inheritance graph
[legend]
Collaboration diagram for XrdXrootdTransSend:
Collaboration graph
[legend]

Public Member Functions

int Send (const struct iovec *headP, int headN, const struct iovec *tailP, int tailN)
 
 XrdXrootdTransSend (XrdLink *lP, kXR_char *sid, kXR_unt16 req, long long offset, int dlen, int fdnum)
 
 XrdXrootdTransSend (XrdLink *lP, kXR_char *sid, kXR_unt16 req, XrdOucSFVec *sfvec, int sfvnum, int dlen)
 
 ~XrdXrootdTransSend ()
 
- Public Member Functions inherited from XrdXrootd::Bridge::Context
 Context (XrdLink *lP, kXR_char *sid, kXR_unt16 req)
 Constructor and Destructor. More...
 
virtual ~Context ()
 

Private Attributes

union {
   long long   sfOff
 
   XrdOucSFVec *   sfVP
 
}; 
 
int sfLen
 
int sfFD
 

Additional Inherited Members

- Public Attributes inherited from XrdXrootd::Bridge::Context
XrdLinklinkP
 -> associated session link object (i.e. connection) More...
 
kXR_unt16 rCode
 associated "kXR" request code in host byte order More...
 
union {
   kXR_unt16   num
 associated stream ID as a short More...
 
   kXR_char   chr [2]
 associated stream ID as the original char[2] More...
 
sID
 associated request stream ID More...
 

Constructor & Destructor Documentation

XrdXrootdTransSend::XrdXrootdTransSend ( XrdLink lP,
kXR_char sid,
kXR_unt16  req,
long long  offset,
int  dlen,
int  fdnum 
)
inline
XrdXrootdTransSend::XrdXrootdTransSend ( XrdLink lP,
kXR_char sid,
kXR_unt16  req,
XrdOucSFVec sfvec,
int  sfvnum,
int  dlen 
)
inline
XrdXrootdTransSend::~XrdXrootdTransSend ( )
inline

Member Function Documentation

int XrdXrootdTransSend::Send ( const struct iovec *  headP,
int  headN,
const struct iovec *  tailP,
int  tailN 
)
virtual

Complete a File() callback.

The Send() method must be called after the File() callback is invoked to complete data transmission using sendfile(). If Send() is not called the pending sendfile() call is not made and no data is sent to the client.

Parameters
headPa pointer to the iovec structure containing the data that must be sent before the sendfile() data. If there is none, the pointer can be null.
headNthe number of elements in the headP iovec structure array.
tailPa pointer to the iovec structure containing the data that must be sent after the sendfile() data. If there is none, the pointer can be null.
tailNthe number of elements in the tailP iovec structure array.
Returns
< 0 transmission error has occurred. This can be due to either connection failure or data source error (i.e. I/O error). = 0 data has been successfully sent. > 0 the supplied context was not generated by a valid File() callback. No data has been sent.
Parameters
headPpointer to leading data array
headNarray count
tailPpointer to trailing data array
tailNarray count

Reimplemented from XrdXrootd::Bridge::Context.

Member Data Documentation

union { ... }
int XrdXrootdTransSend::sfFD
private
int XrdXrootdTransSend::sfLen
private
long long XrdXrootdTransSend::sfOff
XrdOucSFVec* XrdXrootdTransSend::sfVP

The documentation for this class was generated from the following file: