ICancellable |
public interface ICancellableStream
The ICancellableStream type exposes the following members.
Name | Description | |
---|---|---|
Flush | Clear all buffers for this stream and causes any buffered data to be written to the underlying device. | |
Read | Read a sequence of bytes from the stream and advances the position within the stream by the number of bytes read. | |
Write | Write a sequence of bytes to the stream and advances the current position within this stream by the number of bytes written. |
This interface is meant to extend the functionality of a Stream, allowing the MimeParser to have much finer-grained canellability.
When a custom stream implementation also implements this interface, the MimeParser will opt to use this interface instead of the normal Read(Byte, Int32, Int32) API to read data from the stream.
This is really useful when parsing a message or other MIME entity directly from a network-based stream.