|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
9 #ifndef YARP_XMLRPC_CARRIER_XMLRPCSTREAM_H
10 #define YARP_XMLRPC_CARRIER_XMLRPCSTREAM_H
18 #include "XmlRpcClient.h"
19 #include "XmlRpcServerConnection.h"
27 TwoWayStream *delegate;
28 YarpXmlRpc::XmlRpcClient client;
29 YarpXmlRpc::XmlRpcServerConnection server;
36 XmlRpcStream(TwoWayStream *delegate,
bool sender,
bool interpretRos) :
40 interpretRos(interpretRos)
42 this->delegate = delegate;
50 if (delegate !=
nullptr) {
69 return delegate->getLocalAddress();
74 return delegate->getRemoteAddress();
79 return delegate->isOk();
94 delegate->beginPacket();
99 delegate->endPacket();
110 delegate->getInputStream().interrupt();
115 #endif // YARP_XMLRPC_CARRIER_XMLRPCSTREAM_H
A stream which can be asked to perform bidirectional communication.
const yarp::os::Contact & getRemoteAddress() const override
Get the address of the remote side of the stream.
bool isOk() const override
Check if the stream is ok or in an error state.
virtual void write(char ch)
Write a single byte to the stream.
Simple specification of the minimum functions needed from output streams.
yarp::os::OutputStream & getOutputStream() override
Get an OutputStream to write to.
void interrupt() override
Interrupt the stream.
void write(const yarp::os::Bytes &b) override
Write a block of bytes to the stream.
An OutputStream that produces a string.
void close() override
Terminate the stream.
const yarp::os::Contact & getLocalAddress() const override
Get the address of the local side of the stream.
A simple abstraction for a block of bytes.
XmlRpcStream(TwoWayStream *delegate, bool sender, bool interpretRos)
yarp::os::InputStream & getInputStream() override
Get an InputStream to read from.
void reset() override
Reset the stream.
void endPacket() override
Mark the end of a logical packet (see beginPacket).
void beginPacket() override
Mark the beginning of a logical packet.