A stream which can be asked to perform bidirectional communication. More...
#include <yarp/os/TwoWayStream.h>
Public Member Functions | |
virtual | ~TwoWayStream () |
Destructor. More... | |
virtual InputStream & | getInputStream ()=0 |
Get an InputStream to read from. More... | |
virtual OutputStream & | getOutputStream ()=0 |
Get an OutputStream to write to. More... | |
virtual const Contact & | getLocalAddress () const =0 |
Get the address of the local side of the stream. More... | |
virtual const Contact & | getRemoteAddress () const =0 |
Get the address of the remote side of the stream. More... | |
virtual bool | isOk () const =0 |
Check if the stream is ok or in an error state. More... | |
virtual void | reset ()=0 |
Reset the stream. More... | |
virtual void | close ()=0 |
Terminate the stream. More... | |
virtual void | beginPacket ()=0 |
Mark the beginning of a logical packet. More... | |
virtual void | endPacket ()=0 |
Mark the end of a logical packet (see beginPacket). More... | |
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 28 of file TwoWayStream.h.
|
virtualdefault |
Destructor.
|
pure virtual |
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 yarp::os::NullStream, yarp::os::ShiftStream, yarp::os::impl::SocketTwoWayStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::DgramTwoWayStream, XmlRpcStream, UnixSockTwoWayStream, TcpRosStream, ShmemHybridStream, MpiStream, MjpegStream, and HumanStream.
|
pure virtual |
Terminate the stream.
Implemented in MpiStream, yarp::os::NullStream, yarp::os::ShiftStream, yarp::os::impl::SocketTwoWayStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::DgramTwoWayStream, XmlRpcStream, UnixSockTwoWayStream, TcpRosStream, ShmemHybridStream, MpiP2PStream, MpiBcastStream, MjpegStream, and HumanStream.
|
pure virtual |
Mark the end of a logical packet (see beginPacket).
Implemented in yarp::os::NullStream, yarp::os::ShiftStream, yarp::os::impl::SocketTwoWayStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::DgramTwoWayStream, XmlRpcStream, UnixSockTwoWayStream, TcpRosStream, ShmemHybridStream, MpiStream, MjpegStream, and HumanStream.
|
pure virtual |
Get an InputStream to read from.
Implemented in yarp::os::NullStream, yarp::os::ShiftStream, yarp::os::impl::SocketTwoWayStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::DgramTwoWayStream, XmlRpcStream, UnixSockTwoWayStream, TcpRosStream, ShmemHybridStream, MpiStream, MjpegStream, HumanStream, and H264Stream.
|
pure virtual |
Get the address of the local side of the stream.
Implemented in yarp::os::NullStream, yarp::os::ShiftStream, yarp::os::impl::SocketTwoWayStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::DgramTwoWayStream, XmlRpcStream, UnixSockTwoWayStream, TcpRosStream, ShmemHybridStream, MpiStream, MjpegStream, and HumanStream.
|
pure virtual |
Get an OutputStream to write to.
Implemented in yarp::os::NullStream, yarp::os::ShiftStream, yarp::os::impl::SocketTwoWayStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::DgramTwoWayStream, XmlRpcStream, UnixSockTwoWayStream, TcpRosStream, ShmemHybridStream, MpiStream, MjpegStream, HumanStream, and H264Stream.
|
pure virtual |
Get the address of the remote side of the stream.
Implemented in yarp::os::NullStream, yarp::os::ShiftStream, yarp::os::impl::SocketTwoWayStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::DgramTwoWayStream, XmlRpcStream, UnixSockTwoWayStream, TcpRosStream, ShmemHybridStream, MpiStream, MjpegStream, and HumanStream.
|
pure virtual |
Check if the stream is ok or in an error state.
Implemented in yarp::os::NullStream, yarp::os::ShiftStream, yarp::os::impl::SocketTwoWayStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::DgramTwoWayStream, XmlRpcStream, UnixSockTwoWayStream, TcpRosStream, ShmemHybridStream, MpiStream, MjpegStream, and HumanStream.
|
pure virtual |
Reset the stream.
Implemented in yarp::os::NullStream, yarp::os::ShiftStream, yarp::os::impl::SocketTwoWayStream, yarp::os::impl::NameserTwoWayStream, yarp::os::impl::LocalCarrierStream, yarp::os::impl::HttpTwoWayStream, yarp::os::impl::FakeTwoWayStream, yarp::os::impl::DgramTwoWayStream, XmlRpcStream, UnixSockTwoWayStream, TcpRosStream, ShmemHybridStream, MpiStream, MjpegStream, and HumanStream.