xrootd
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
XrdXrootd::Bridge::Context Class Reference

#include <XrdXrootdBridge.hh>

Inheritance diagram for XrdXrootd::Bridge::Context:
Inheritance graph
[legend]
Collaboration diagram for XrdXrootd::Bridge::Context:
Collaboration graph
[legend]

Public Member Functions

virtual int Send (const struct iovec *headP, int headN, const struct iovec *tailP, int tailN)
 
 Context (XrdLink *lP, kXR_char *sid, kXR_unt16 req)
 Constructor and Destructor.
 
virtual ~Context ()
 

Public Attributes

XrdLinklinkP
 -> associated session link object (i.e. connection)
 
kXR_unt16 rCode
 associated "kXR" request code in host byte order
 
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
 

Detailed Description

Provide callback context.

The Context object is passed in all Result object callbacks and contains information describing the result context. No public members should be changed by any result callback method. The context object also includes a method that must be used to complete a pending sendfile() result.

Constructor & Destructor Documentation

◆ Context()

XrdXrootd::Bridge::Context::Context ( XrdLink lP,
kXR_char sid,
kXR_unt16  req 
)
inline

Constructor and Destructor.

References sID.

◆ ~Context()

virtual XrdXrootd::Bridge::Context::~Context ( )
inlinevirtual

Member Function Documentation

◆ Send()

virtual int XrdXrootd::Bridge::Context::Send ( const struct iovec *  headP,
int  headN,
const struct iovec *  tailP,
int  tailN 
)
inlinevirtual

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 in XrdXrootdTransSend.

Member Data Documentation

◆ chr

kXR_char XrdXrootd::Bridge::Context::chr[2]

associated stream ID as the original char[2]

◆ linkP

XrdLink* XrdXrootd::Bridge::Context::linkP

-> associated session link object (i.e. connection)

◆ num

kXR_unt16 XrdXrootd::Bridge::Context::num

associated stream ID as a short

◆ rCode

kXR_unt16 XrdXrootd::Bridge::Context::rCode

associated "kXR" request code in host byte order

◆ [union]

union { ... } XrdXrootd::Bridge::Context::sID

associated request stream ID

Referenced by Context().


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