xrootd
|
#include <XrdSsiStream.hh>
Classes | |
class | Buffer |
Public Types | |
enum | StreamType { isActive = 0 , isPassive } |
Public Member Functions | |
virtual Buffer * | GetBuff (XrdSsiErrInfo &eRef, int &dlen, bool &last) |
virtual bool | SetBuff (XrdSsiErrInfo &eRef, char *buff, int blen) |
virtual int | SetBuff (XrdSsiErrInfo &eRef, char *buff, int blen, bool &last) |
StreamType | Type () |
XrdSsiStream (StreamType stype) | |
virtual | ~XrdSsiStream () |
Protected Attributes | |
const StreamType | SType |
The XrdSsiStream class describes an object capable of providing data for a response in real time. A pointer to such an object may be used to set this response mode via XrdSsiResponder::SetResponse(). Two kinds of streams exist:
Active the stream supplies the buffer that contains the response data. The buffer is recycled via Buffer::Recycle() once the response data is sent. Active streams are supported only server-side. Passive the stream requires a buffer to be passed to it where response data will be placed. Only passive streams are created on the client-side. Passive streams can also work in asynchronous mode. However, async mode is never used server-side but may be requested client-side.
The type of stream must be declared at the time the stream is created. You must supply an implementation for the associated stream type.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Synchronously obtain data from an active stream (server-side only).
eRef | The object to receive any error description. |
dlen | input: the optimal amount of data wanted (this is a hint) output: the actual amount of data returned in the buffer. |
last | input: should be set to false. output: if true it indicates that no more data remains to be returned either for this call or on the next call. |
References XrdSsiErrInfo::Set().
|
inlinevirtual |
Asynchronously obtain data from a passive stream (client-side only).
eRef | reference to where error information is to be placed for encountered before during the stream initiation. When data is ready for processing, the ProcessResponseData() callback is called on the request associated with this stream. Also see XrdSsiRequest::GetResponseData() helper method. |
buff | pointer to the buffer to receive the data. The buffer must remain valid until ProcessResponse() is called. |
blen | the length of the buffer (i.e. maximum that can be returned). |
Reimplemented in XrdSsiTaskReal.
References XrdSsiErrInfo::Set().
|
inlinevirtual |
Synchronously obtain data from a passive stream (client- or server-side).
eRef | The object to receive any error description. |
buff | pointer to the buffer to receive the data. request object is notified that the operation completed. |
blen | the length of the buffer (i.e. maximum that can be returned). |
last | input: should be set to false. output: if true it indicates that no more data remains to be returned either for this call or on the next call. |
Reimplemented in XrdSsiTaskReal.
References XrdSsiErrInfo::Set().
|
inline |
|
protected |
Referenced by Type().