|
Telnet++ 4.0.0.9
A C++ library for interacting with Telnet streams
|
Represents an object that can transform (encode or decode) arbitrary byte sequences. For this option, this implies compression and decompression. More...
#include <codec.hpp>
Public Types | |
| using | continuation = std::function< void(telnetpp::bytes data, bool continuation_ended)> |
Public Member Functions | |
| virtual | ~codec ()=default |
| Destructor. | |
| void | start () |
| Starts the transformation stream. Calls to operator() now assume that the input requires transformation. | |
| void | finish (continuation const &cont) |
| Finishes the current decompression stream. Calls to operator() now assume that the input does not require transformation. | |
| void | operator() (telnetpp::bytes data, continuation const &cont) |
| Transform data, if the stream is started, sending the result of the transformation to the continuation. If the stream is not started, the data is passed on untransformed. | |
Represents an object that can transform (encode or decode) arbitrary byte sequences. For this option, this implies compression and decompression.
| void telnetpp::options::mccp::codec::operator() | ( | telnetpp::bytes | data, |
| continuation const & | cont | ||
| ) |
Transform data, if the stream is started, sending the result of the transformation to the continuation. If the stream is not started, the data is passed on untransformed.
| corrupted_stream_error | if the data was malformed. |