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

Interface class for TLV-messages connection Reactor handlers. More...

#include <tsReactiveTLVStreamHandlerInterface.h>

Public Member Functions

virtual void handleReceiveMessage (ReactiveTLVStream &sock, const tlv::MessagePtr &msg, int error_code, const ObjectPtr &user_data)
 Handle the reception of one valid message.
 
virtual void handleSendMessage (ReactiveTLVStream &sock, const ByteBlockPtr &msg, int error_code, const ObjectPtr &user_data)
 Handle the termination of message send operation.
 

Detailed Description

Interface class for TLV-messages connection Reactor handlers.

An application shall use ReactiveTCPConnectionHandlerInterface for the non-TLV parts of the connection. All methods are empty by default. An application may implement the required ones only.

Member Function Documentation

◆ handleReceiveMessage()

virtual void ts::ReactiveTLVStreamHandlerInterface::handleReceiveMessage ( ReactiveTLVStream sock,
const tlv::MessagePtr msg,
int  error_code,
const ObjectPtr user_data 
)
virtual

Handle the reception of one valid message.

Parameters
[in,out]sockTCP socket for which the handler is invoked.
[in]msgPointer to a received decoded message. Can be null in case of error.
[in]error_codeSystem-specific error code, including:
  • SYS_SUCCESS on success.
  • SYS_EOF on end of input or if the peer has disconnected,
  • SYS_ERROR in case of unknown error.
[in]user_dataThe user-data shared pointer which was passed to startReceive().

◆ handleSendMessage()

virtual void ts::ReactiveTLVStreamHandlerInterface::handleSendMessage ( ReactiveTLVStream sock,
const ByteBlockPtr msg,
int  error_code,
const ObjectPtr user_data 
)
virtual

Handle the termination of message send operation.

Parameters
[in,out]sockTCP socket for which the handler is invoked.
[in]msgPointer the serialized content of the message. Can be null in case of error.
[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 startSendMessage().

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