A stream which can be asked to perform bidirectional communication. More...
#include <yarp/os/TwoWayStream.h>
Public Member Functions | |
virtual | ~TwoWayStream () |
Destructor. | |
virtual InputStream & | getInputStream ()=0 |
Get an InputStream to read from. | |
virtual OutputStream & | getOutputStream ()=0 |
Get an OutputStream to write to. | |
virtual const Contact & | getLocalAddress () const =0 |
Get the address of the local side of the stream. | |
virtual const Contact & | getRemoteAddress () const =0 |
Get the address of the remote side of the stream. | |
virtual bool | isOk () const =0 |
Check if the stream is ok or in an error state. | |
virtual void | reset ()=0 |
Reset the stream. | |
virtual void | close ()=0 |
Terminate the stream. | |
virtual void | beginPacket ()=0 |
Mark the beginning of a logical packet. | |
virtual void | endPacket ()=0 |
Mark the end of a logical packet (see beginPacket). | |
A stream which can be asked to perform bidirectional communication.
It need not actually be capable of communication in both directions, in which case it should fail if requested to communicate in an unsupported direction.
Definition at line 24 of file TwoWayStream.h.
|
virtualdefault |
Destructor.
Mark the beginning of a logical packet.
This is a unit that should be treated in an atomic fashion by YARP. If any part is corrupted, the whole should be dropped.
Implemented in GstreamerStream, HumanStream, MjpegStream, MpiStream, ShmemHybridStream, UnixSockTwoWayStream, WebSocketStream, yarp::os::impl::DgramTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::SocketTwoWayStream, yarp::os::ShiftStream, and yarp::os::NullStream.
Terminate the stream.
Implemented in GstreamerStream, HumanStream, MjpegStream, MpiBcastStream, MpiP2PStream, ShmemHybridStream, UnixSockTwoWayStream, WebSocketStream, yarp::os::impl::DgramTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::SocketTwoWayStream, yarp::os::ShiftStream, yarp::os::NullStream, and MpiStream.
Mark the end of a logical packet (see beginPacket).
Implemented in GstreamerStream, HumanStream, MjpegStream, MpiStream, ShmemHybridStream, UnixSockTwoWayStream, WebSocketStream, yarp::os::impl::DgramTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::SocketTwoWayStream, yarp::os::ShiftStream, and yarp::os::NullStream.
|
pure virtual |
Get an InputStream to read from.
Implemented in GstreamerStream, HumanStream, MjpegStream, MpiStream, ShmemHybridStream, UnixSockTwoWayStream, WebSocketStream, yarp::os::impl::DgramTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::SocketTwoWayStream, yarp::os::ShiftStream, and yarp::os::NullStream.
Get the address of the local side of the stream.
Implemented in GstreamerStream, HumanStream, MjpegStream, MpiStream, ShmemHybridStream, UnixSockTwoWayStream, WebSocketStream, yarp::os::impl::DgramTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::SocketTwoWayStream, yarp::os::ShiftStream, and yarp::os::NullStream.
|
pure virtual |
Get an OutputStream to write to.
Implemented in GstreamerStream, HumanStream, MjpegStream, MpiStream, ShmemHybridStream, UnixSockTwoWayStream, WebSocketStream, yarp::os::impl::DgramTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::SocketTwoWayStream, yarp::os::ShiftStream, and yarp::os::NullStream.
Get the address of the remote side of the stream.
Implemented in GstreamerStream, HumanStream, MjpegStream, MpiStream, ShmemHybridStream, UnixSockTwoWayStream, WebSocketStream, yarp::os::impl::DgramTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::SocketTwoWayStream, yarp::os::ShiftStream, and yarp::os::NullStream.
Check if the stream is ok or in an error state.
Implemented in GstreamerStream, HumanStream, MjpegStream, MpiStream, ShmemHybridStream, UnixSockTwoWayStream, WebSocketStream, yarp::os::impl::DgramTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::SocketTwoWayStream, yarp::os::ShiftStream, and yarp::os::NullStream.
Reset the stream.
Implemented in GstreamerStream, HumanStream, MjpegStream, MpiStream, ShmemHybridStream, UnixSockTwoWayStream, WebSocketStream, yarp::os::impl::DgramTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::SocketTwoWayStream, yarp::os::ShiftStream, and yarp::os::NullStream.