Abstract base class for binary streams. More...
#include <Radiant/BinaryStream.hpp>
Public Member Functions | |
| BinaryStream () | |
| Constructor. | |
| virtual bool | close () |
| Close the stream. More... | |
| virtual bool | isHungUp () const |
| Returns true if the stream has been closed. More... | |
| virtual bool | isOpen () const |
| Checks whether the stream is still accessible. More... | |
| virtual bool | isPendingInput (unsigned int waitMicroSeconds=0) |
| Returns true if the stream has at least one byte waiting to be read; otherwise returns false. More... | |
| virtual int | read (void *buffer, int bytes, bool waitfordata=true)=0 |
| Read bytes from the stream. More... | |
| virtual int | write (const void *buffer, int bytes)=0 |
| Write bytes to the stream. More... | |
| virtual | ~BinaryStream () |
| Destructor. | |
Abstract base class for binary streams.
|
inlinevirtual |
Close the stream.
Reimplemented in Radiant::UDPSocket, Radiant::TCPSocket, and Radiant::SerialPort.
|
inlinevirtual |
Returns true if the stream has been closed.
Reimplemented in Radiant::TCPSocket.
|
inlinevirtual |
Checks whether the stream is still accessible.
Reimplemented in Radiant::SerialPort, Radiant::TCPSocket, and Radiant::UDPSocket.
|
inlinevirtual |
Returns true if the stream has at least one byte waiting to be read; otherwise returns false.
| waitMicroSeconds | How many microseconds this call will block at most. In this class the implementation ignores this parameter. |
Reimplemented in Radiant::TCPSocket.
|
pure virtual |
Read bytes from the stream.
| buffer | Buffer to read from |
| bytes | Number of bytes to read |
| waitfordata | Does this call block until all of the data is available |
Implemented in Radiant::TCPSocket, Radiant::UDPSocket, and Radiant::SerialPort.
|
pure virtual |
Write bytes to the stream.
| buffer | Buffer to write |
| bytes | Number of bytes to write |
Implemented in Radiant::TCPSocket, Radiant::UDPSocket, and Radiant::SerialPort.