![]() |
XRootD
|
#include <XrdSsiStream.hh>
Classes | |
class | Buffer |
Public Types | |
enum | StreamType { isActive = 0 , isPassive } |
Public Member Functions | |
XrdSsiStream (StreamType stype) | |
virtual | ~XrdSsiStream () |
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 () |
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.
Definition at line 53 of file XrdSsiStream.hh.
Stream type descriptor:
isActive - Active stream that supplies it own buffers with data. GetBuff() & RetBuff() must be used.
isPassive - Passive stream that provides data via a supplied buffer. SetBuff() must be used.
Enumerator | |
---|---|
isActive | |
isPassive |
Definition at line 144 of file XrdSsiStream.hh.
|
inline |
Definition at line 154 of file XrdSsiStream.hh.
|
inlinevirtual |
Definition at line 156 of file XrdSsiStream.hh.
|
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. |
Definition at line 93 of file XrdSsiStream.hh.
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.
Definition at line 112 of file XrdSsiStream.hh.
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.
Definition at line 131 of file XrdSsiStream.hh.
References XrdSsiErrInfo::Set().
|
inline |
Get the stream type descriptor.
Definition at line 152 of file XrdSsiStream.hh.
References SType.
|
protected |
Definition at line 160 of file XrdSsiStream.hh.
Referenced by Type().