The basic state of a connection - route, streams in use, etc. More...
#include <yarp/os/ConnectionState.h>
Public Member Functions | |
virtual | ~ConnectionState () |
Destructor. More... | |
virtual const Route & | getRoute () const =0 |
Get the route associated with this connection. More... | |
virtual void | setRoute (const Route &route)=0 |
Set the route associated with this connection. More... | |
virtual OutputStream & | getOutputStream ()=0 |
Access the output stream associated with this connection. More... | |
virtual InputStream & | getInputStream ()=0 |
Access the input stream associated with this connection. More... | |
virtual Connection & | getConnection ()=0 |
Access the controller for this connection. More... | |
virtual void | setRemainingLength (int len)=0 |
Tell the connection that the given number of bytes are left to be read. More... | |
virtual std::string | getSenderSpecifier () const =0 |
Extract a name for the sender, if the connection type supports that. More... | |
virtual TwoWayStream & | getStreams ()=0 |
Access the streams associated with the connection. More... | |
virtual void | takeStreams (TwoWayStream *streams)=0 |
Provide streams to be used with the connection. More... | |
virtual TwoWayStream * | giveStreams ()=0 |
Take ownership of the streams associated with the connection. More... | |
virtual void | setReference (yarp::os::Portable *ref)=0 |
Give a direct pointer to an object being sent on the connection. More... | |
virtual bool | checkStreams () const =0 |
Check whether streams are in a good state. More... | |
virtual Contactable * | getContactable () const =0 |
Get the port associated with the connection. More... | |
OutputStream & | os () |
Shorthand for getOutputStream() More... | |
InputStream & | is () |
Shorthand for getInputStream() More... | |
virtual const std::string & | getEnvelope () const =0 |
Read the envelope associated with the current message. More... | |
The basic state of a connection - route, streams in use, etc.
Definition at line 30 of file ConnectionState.h.
|
virtualdefault |
Destructor.
|
pure virtual |
Check whether streams are in a good state.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Access the controller for this connection.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Get the port associated with the connection.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Read the envelope associated with the current message.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Access the input stream associated with this connection.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Access the output stream associated with this connection.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Get the route associated with this connection.
A route is a triplet of the source port, destination port, and carrier.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Extract a name for the sender, if the connection type supports that.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Access the streams associated with the connection.
The connection remains the owner of those streams.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Take ownership of the streams associated with the connection.
The connection will never touch them again after this call.
Implemented in yarp::os::impl::Protocol.
|
inline |
Shorthand for getInputStream()
Definition at line 125 of file ConnectionState.h.
|
inline |
Shorthand for getOutputStream()
Definition at line 117 of file ConnectionState.h.
|
pure virtual |
Give a direct pointer to an object being sent on the connection.
This allows serialization to be bypassed for local connections.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Tell the connection that the given number of bytes are left to be read.
This is useful when there is no low-level way to know this.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Set the route associated with this connection.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Provide streams to be used with the connection.
The connection becomes the owner of these streams. Any streams already in use are closed and destroyed.
Implemented in yarp::os::impl::Protocol.