TSDuck v3.44-4659
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::ReactorHandlerInterface Class Reference

Interface class for Reactor handlers. More...

#include <tsReactorHandlerInterface.h>

Inheritance diagram for ts::ReactorHandlerInterface:

Public Member Functions

virtual void handleAsynchronousIO (Reactor &reactor, EventId id, NonBlockingDevice::IOSB &iosb, size_t io_size, int error_code)
 Handle an asynchronous I/O completion event in a Reactor.
 
virtual void handleReadReady (Reactor &reactor, EventId id, int error_code)
 Handle a read-ready event in a Reactor.
 
virtual void handleTimer (Reactor &reactor, EventId id)
 Handle a timer in a Reactor.
 
virtual void handleUserEvent (Reactor &reactor, EventId id)
 Handle a user-defined event in a Reactor.
 
virtual void handleWriteReady (Reactor &reactor, EventId id, int error_code)
 Handle a write-ready event in a Reactor.
 

Detailed Description

Interface class for Reactor handlers.

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

Member Function Documentation

◆ handleTimer()

virtual void ts::ReactorHandlerInterface::handleTimer ( Reactor reactor,
EventId  id 
)
virtual

Handle a timer in a Reactor.

Parameters
[in,out]reactorReactor into which the handler is invoked.
[in]idId of the timer which expires.

◆ handleUserEvent()

virtual void ts::ReactorHandlerInterface::handleUserEvent ( Reactor reactor,
EventId  id 
)
virtual

Handle a user-defined event in a Reactor.

Parameters
[in,out]reactorReactor into which the handler is invoked.
[in]idId of the event which was signaled.

◆ handleReadReady()

virtual void ts::ReactorHandlerInterface::handleReadReady ( Reactor reactor,
EventId  id,
int  error_code 
)
virtual

Handle a read-ready event in a Reactor.

This handler is only invoked in the non-blocking I/O model.

Parameters
[in,out]reactorReactor into which the handler is invoked.
[in]idId of the event which was signaled.
[in]error_codeSystem-specific error code, zero on success, SYS_ERROR in case of unknown error.

◆ handleWriteReady()

virtual void ts::ReactorHandlerInterface::handleWriteReady ( Reactor reactor,
EventId  id,
int  error_code 
)
virtual

Handle a write-ready event in a Reactor.

This handler is only invoked in the non-blocking I/O model.

Parameters
[in,out]reactorReactor into which the handler is invoked.
[in]idId of the event which was signaled.
[in]error_codeSystem-specific error code, zero on success, SYS_ERROR in case of unknown error.

◆ handleAsynchronousIO()

virtual void ts::ReactorHandlerInterface::handleAsynchronousIO ( Reactor reactor,
EventId  id,
NonBlockingDevice::IOSB iosb,
size_t  io_size,
int  error_code 
)
virtual

Handle an asynchronous I/O completion event in a Reactor.

This handler is only invoked in the asynchronous I/O model.

Parameters
[in,out]reactorReactor into which the handler is invoked.
[in]idId of the event which was signaled.
[in,out]iosbIOSB structure which was used when the asynchronous I/O was started.
[in]io_sizeSize of the I/O in bytes.
[in]error_codeSystem-specific error code, zero on success, SYS_ERROR in case of unknown error, SYS_CANCELED if the I/O was canceled before completion.

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