#include <IStream.h>
Inherits IInterface.
Inherited by CStreamFilter, and IDataSocket.
Inheritance diagram for IStream:
accessors | |
virtual void * | getEventTarget () const =0 |
Get event target. | |
virtual bool | isReady () const =0 |
Test if read() will succeed. | |
virtual UInt32 | getSize () const =0 |
Get bytes available to read. | |
CEvent::Type | getInputReadyEvent () |
Get input ready event type. | |
CEvent::Type | getOutputFlushedEvent () |
Get output flushed event type. | |
CEvent::Type | getOutputErrorEvent () |
Get output error event type. | |
CEvent::Type | getInputShutdownEvent () |
Get input shutdown event type. | |
CEvent::Type | getOutputShutdownEvent () |
Get output shutdown event type. | |
Public Member Functions | |
manipulators | |
virtual void | close ()=0 |
Close the stream. | |
virtual UInt32 | read (void *buffer, UInt32 n)=0 |
Read from stream. | |
virtual void | write (const void *buffer, UInt32 n)=0 |
Write to stream. | |
virtual void | flush ()=0 |
Flush the stream. | |
virtual void | shutdownInput ()=0 |
Shutdown input. | |
virtual void | shutdownOutput ()=0 |
Shutdown output. |
Defines the interface for all streams.
Definition at line 25 of file IStream.h.
|
Close the stream.
Closes the stream. Pending input data and buffered output data are discarded. Use Implemented in CStreamFilter, CTCPSocket, IDataSocket, and CPacketStreamFilter. Referenced by CStreamFilter::close(). |
|
Flush the stream. Waits until all buffered data has been written to the stream. Implemented in CStreamFilter, CTCPSocket, and IDataSocket. Referenced by CClientProxy::close(), and CStreamFilter::flush(). |
|
Get event target. Returns the event target for events generated by this stream. It should be the source stream in a chain of stream filters. Implemented in CStreamFilter, CTCPSocket, and IDataSocket. Referenced by CServerProxy::CServerProxy(), and CStreamFilter::CStreamFilter(). |
|
Get input ready event type.
Returns the input ready event type. A stream sends this event when Definition at line 28 of file IStream.cpp. References CEvent::registerTypeOnce(). Referenced by CPacketStreamFilter::filterEvent(). |
|
Get input shutdown event type. Returns the input shutdown event type. This is sent when the input side of the stream has shutdown. When the input has shutdown, no more data will ever be available to read. Definition at line 49 of file IStream.cpp. References CEvent::registerTypeOnce(). Referenced by CPacketStreamFilter::filterEvent(), CPacketStreamFilter::read(), and CTCPSocket::shutdownInput(). |
|
Get output error event type. Returns the output error event type. A stream sends this event when a write has failed. Definition at line 42 of file IStream.cpp. References CEvent::registerTypeOnce(). Referenced by CTCPSocket::write(). |
|
Get output flushed event type.
Returns the output flushed event type. A stream sends this event when the output buffer has been flushed. If there have been no writes since the event was posted, calling Definition at line 35 of file IStream.cpp. References CEvent::registerTypeOnce(). |
|
Get output shutdown event type. Returns the output shutdown event type. This is sent when the output side of the stream has shutdown. When the output has shutdown, no more data can ever be written to the stream. Any attempt to do so will generate a output error event. Definition at line 56 of file IStream.cpp. References CEvent::registerTypeOnce(). Referenced by CTCPSocket::shutdownOutput(). |
|
Get bytes available to read. Returns a conservative estimate of the available bytes to read (i.e. a number not greater than the actual number of bytes). Some streams may not be able to determine this and will always return zero. Implemented in CStreamFilter, CTCPSocket, IDataSocket, and CPacketStreamFilter. Referenced by CStreamFilter::getSize(). |
|
Test if
Returns true iff an immediate Implemented in CStreamFilter, CTCPSocket, IDataSocket, and CPacketStreamFilter. Referenced by CStreamFilter::isReady(). |
|
Read from stream.
Read up to Implemented in CStreamFilter, CTCPSocket, IDataSocket, and CPacketStreamFilter. Referenced by CStreamFilter::read(). |
|
Shutdown input. Shutdown the input side of the stream. Any pending input data is discarded and further reads immediately return 0. Implemented in CStreamFilter, CTCPSocket, IDataSocket, and CPacketStreamFilter. Referenced by CStreamFilter::shutdownInput(). |
|
Shutdown output.
Shutdown the output side of the stream. Any buffered output data is discarded and further writes generate output error events. Use Implemented in CStreamFilter, CTCPSocket, and IDataSocket. Referenced by CStreamFilter::shutdownOutput(). |
|
Write to stream.
Write Implemented in CStreamFilter, CTCPSocket, IDataSocket, and CPacketStreamFilter. Referenced by CStreamFilter::write(), and CPacketStreamFilter::write(). |