#include <tsReactiveTextStreamHandlerInterface.h>
Interface class for line-oriented Telnet-like connection Reactor handlers. With a ReactiveTCPConnection, an application shall use ReactiveTCPConnectionHandlerInterface for the non-line-oriented parts of the connection (connection, close, etc). All methods are empty by default. An application may implement the required ones only.
◆ handleTextLine()
Handle the reception of one text line.
- Parameters
-
| [in,out] | stream | Reactive stream for which the handler is invoked. |
| [in] | line | Received text line, without end-of-line markers. |
| [in] | error_code | System-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_data | The user-data shared pointer which was passed to startReadText(). |
◆ handleWriteText()
| virtual void ts::ReactiveTextStreamHandlerInterface::handleWriteText |
( |
ReactiveTextStream & | stream, |
|
|
const std::string & | text, |
|
|
int | error_code, |
|
|
const ObjectPtr & | user_data ) |
|
virtual |
Handle the termination of a write operation.
- Parameters
-
| [in,out] | stream | Reactive stream for which the handler is invoked. |
| [in] | text | Sent text. This is the raw sent text, with embedded end-of-lines and UTF-8 translation of UString lines. When flush was set to false in some start-write operations, the text contains the concatenation of all previous unflushed operations. |
| [in] | error_code | System-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_data | The user-data shared pointer which was passed to startWriteLine() or startWriteText(). |
The documentation for this class was generated from the following file: