Interface for custom flush signals propagation.
More...
#include <simple.h>
|
virtual bool | Flush (bool hardFlush, int propagation=-1, bool blocking=true)=0 |
| Flush buffered input and/or output, with signal propagation.
|
|
template<class T>
class CustomFlushPropagation< T >
Interface for custom flush signals propagation.
- Template Parameters
-
Definition at line 261 of file simple.h.
◆ Flush()
template<class T >
virtual bool CustomFlushPropagation< T >::Flush |
( |
bool |
hardFlush, |
|
|
int |
propagation = -1 , |
|
|
bool |
blocking = true |
|
) |
| |
|
pure virtual |
Flush buffered input and/or output, with signal propagation.
- Parameters
-
hardFlush | is used to indicate whether all data should be flushed |
propagation | the number of attached transformations the Flush() signal should be passed |
blocking | specifies whether the object should block when processing input |
propagation count includes this object. Setting propagation to 1
means this object only. Setting propagation to -1
means unlimited propagation.
- Note
- Hard flushes must be used with care. It means try to process and output everything, even if there may not be enough data to complete the action. For example, hard flushing a HexDecoder would cause an error if you do it after inputing an odd number of hex encoded characters.
-
For some types of filters, like ZlibDecompressor, hard flushes can only be done at "synchronization points". These synchronization points are positions in the data stream that are created by hard flushes on the corresponding reverse filters, in this example ZlibCompressor. This is useful when zlib compressed data is moved across a network in packets and compression state is preserved across packets, as in the SSH2 protocol.
Implemented in Unflushable< Multichannel< Filter > >, Redirector, OutputProxy, SecretSharing, InformationDispersal, Multichannel< T >, Multichannel< Filter >, and Multichannel< Sink >.
The documentation for this class was generated from the following file:
- G:/work/subversion/scol-technologies/trunk/scol/plugins/security/cryptopp/simple.h