6#ifndef YARP_OS_CONNECTIONSTATE_H
7#define YARP_OS_CONNECTIONSTATE_H
115 return getOutputStream();
123 return getInputStream();
A mini-server for performing network communication in the background.
The basic state of a connection - route, streams in use, etc.
OutputStream & os()
Shorthand for getOutputStream()
virtual void setRemainingLength(int len)=0
Tell the connection that the given number of bytes are left to be read.
virtual void setReference(yarp::os::Portable *ref)=0
Give a direct pointer to an object being sent on the connection.
virtual const std::string & getEnvelope() const =0
Read the envelope associated with the current message.
virtual OutputStream & getOutputStream()=0
Access the output stream associated with this connection.
virtual const Route & getRoute() const =0
Get the route associated with this connection.
virtual TwoWayStream * giveStreams()=0
Take ownership of the streams associated with the connection.
virtual InputStream & getInputStream()=0
Access the input stream associated with this connection.
virtual ~ConnectionState()
Destructor.
virtual std::string getSenderSpecifier() const =0
Extract a name for the sender, if the connection type supports that.
InputStream & is()
Shorthand for getInputStream()
virtual bool checkStreams() const =0
Check whether streams are in a good state.
virtual void takeStreams(TwoWayStream *streams)=0
Provide streams to be used with the connection.
virtual TwoWayStream & getStreams()=0
Access the streams associated with the connection.
virtual void setRoute(const Route &route)=0
Set the route associated with this connection.
virtual Connection & getConnection()=0
Access the controller for this connection.
virtual Contactable * getContactable() const =0
Get the port associated with the connection.
A controller for an individual connection.
Simple specification of the minimum functions needed from output streams.
This is a base class for objects that can be both read from and be written to the YARP network.
Information about a connection between two ports.
A stream which can be asked to perform bidirectional communication.
An interface to the operating system, including Port based communication.