TSDuck v3.45-4766
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::ReactiveStreamHandlerInterface Class Reference

Interface class for StreamInterface Reactor handlers. More...

#include <tsReactiveStreamHandlerInterface.h>

Inheritance diagram for ts::ReactiveStreamHandlerInterface:

Public Member Functions

virtual void handleReadStream (ReactiveStream &stream, const ByteBlock &data, ReactiveInputControl &control, int error_code, const ObjectPtr &user_data)
 Handle the reception of data from a read operation on a stream.
 
virtual void handleWriteStream (ReactiveStream &stream, int error_code, const ObjectPtr &user_data)
 Handle the completion of a write operation on a stream.
 

Detailed Description

Interface class for StreamInterface Reactor handlers.

All methods are empty by default. An application may implement the required ones only.

Member Function Documentation

◆ handleWriteStream()

virtual void ts::ReactiveStreamHandlerInterface::handleWriteStream ( ReactiveStream stream,
int  error_code,
const ObjectPtr user_data 
)
virtual

Handle the completion of a write operation on a stream.

Parameters
[in,out]streamStream device for which the handler is invoked.
[in]error_codeSystem-specific error code, including:
  • SYS_SUCCESS on success.
  • SYS_EOF if the handler is called as a completion of "close write" or "send EOF", whatever it means for the stream device.
  • SYS_CANCELED if the I/O was canceled before completion.
  • SYS_ERROR in case of unknown error.
[in]user_dataThe user-data shared pointer which was passed to startWriteStream().

Reimplemented in ts::ReactiveTLSConnection.

◆ handleReadStream()

virtual void ts::ReactiveStreamHandlerInterface::handleReadStream ( ReactiveStream stream,
const ByteBlock data,
ReactiveInputControl control,
int  error_code,
const ObjectPtr user_data 
)
virtual

Handle the reception of data from a read operation on a stream.

Parameters
[in,out]streamStream device for which the handler is invoked.
[in]dataReceived data.
[in,out]controlInput control data that the handler may update according to the usage of data.
[in]error_codeSystem-specific error code, including:
  • SYS_SUCCESS on success.
  • SYS_EOF at end of file or if the other end of a communication link has disconnected,
  • SYS_ERROR in case of unknown error.
[in]user_dataThe user-data shared pointer which was passed to startReadStream().

Reimplemented in ts::ReactiveTLSConnection.


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