7#ifndef YARP_OS_TWOWAYSTREAM_H
8#define YARP_OS_TWOWAYSTREAM_H
69 virtual bool isOk()
const = 0;
115 const Contact& getLocalAddress()
const override;
116 const Contact& getRemoteAddress()
const override;
118 bool isOk()
const override;
119 void reset()
override;
120 void close()
override;
121 void beginPacket()
override;
122 void endPacket()
override;
128 void write(
const Bytes& b)
override;
A simple abstraction for a block of bytes.
A "null" stream, always invalid.
Simple specification of the minimum functions needed from output streams.
virtual void write(char ch)
Write a single byte to the stream.
A stream which can be asked to perform bidirectional communication.
virtual InputStream & getInputStream()=0
Get an InputStream to read from.
virtual const Contact & getRemoteAddress() const =0
Get the address of the remote side of the stream.
virtual void endPacket()=0
Mark the end of a logical packet (see beginPacket).
virtual void close()=0
Terminate the stream.
virtual void reset()=0
Reset the stream.
virtual ~TwoWayStream()
Destructor.
virtual void beginPacket()=0
Mark the beginning of a logical packet.
virtual bool isOk() const =0
Check if the stream is ok or in an error state.
virtual const Contact & getLocalAddress() const =0
Get the address of the local side of the stream.
virtual OutputStream & getOutputStream()=0
Get an OutputStream to write to.
An interface to the operating system, including Port based communication.