9 #ifndef YARP_XMLRPC_CARRIER_XMLRPCCARRIER_H
10 #define YARP_XMLRPC_CARRIER_XMLRPCCARRIER_H
107 return "xmlrpc_carrier";
112 const char *target =
"POST /RP";
113 for (
size_t i=0; i<8 && i<header.
length(); i++) {
114 header.
get()[i] = target[i];
123 const char *target =
"POST /";
124 for (
int i=0; i<6; i++) {
125 if (header.
get()[i] != target[i]) {
163 if (stream ==
nullptr) {
This carrier enables XML/RPC message transmission.
void setParameters(const yarp::os::Bytes &header) override
Configure this carrier based on the first 8 bytes of the connection.
bool expectSenderSpecifier(yarp::os::ConnectionState &proto) override
Expect the name of the sending port.
bool reply(yarp::os::ConnectionState &proto, yarp::os::SizedWriter &writer) override
bool expectAck(yarp::os::ConnectionState &proto) override
Receive an acknowledgement, if expected for this carrier.
bool isTextMode() const override
Check if carrier is textual in nature.
void getHeader(yarp::os::Bytes &header) const override
Provide 8 bytes describing this connection sufficiently to allow the other side of a connection to se...
bool canEscape() const override
Check if carrier can encode administrative messages, as opposed to just user data.
bool expectExtraHeader(yarp::os::ConnectionState &proto) override
Receive any carrier-specific header.
std::string toString() const override
Get name of carrier.
bool requireAck() const override
Check if carrier has flow control, requiring sent messages to be acknowledged by recipient.
bool sendAck(yarp::os::ConnectionState &proto) override
Send an acknowledgement, if needed for this carrier.
bool isLocal() const override
Check if carrier operates within a single process.
bool checkHeader(const yarp::os::Bytes &header) override
Given the first 8 bytes received on a connection, decide if this is the right carrier type to use for...
bool isConnectionless() const override
Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp).
bool supportReply() const override
This flag is used by YARP to determine whether the connection can carry RPC traffic,...
bool expectReplyToHeader(yarp::os::ConnectionState &proto) override
Process reply to header, if one is expected for this carrier.
virtual bool sendIndex(yarp::os::ConnectionState &proto, yarp::os::SizedWriter &writer)
bool respondToHeader(yarp::os::ConnectionState &proto) override
Respond to the header.
bool expectIndex(yarp::os::ConnectionState &proto) override
Expect a message header, if there is one for this carrier.
bool canAccept() const override
Check if reading is implemented for this carrier.
bool write(yarp::os::ConnectionState &proto, yarp::os::SizedWriter &writer) override
Write a message.
std::string getBootstrapCarrierName() const override
Get the name of the carrier that should be used prior to handshaking, if a port is registered with th...
bool canOffer() const override
Check if writing is implemented for this carrier.
bool prepareSend(yarp::os::ConnectionState &proto) override
Perform any initialization needed before writing on a connection.
Carrier * create() const override
Factory method.
bool sendHeader(yarp::os::ConnectionState &proto) override
Write a header appropriate to the carrier to the connection, followed by any carrier-specific data.
std::string getName() const override
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
bool isActive() const override
Check if carrier is alive and error free.
A simple abstraction for a block of bytes.
A base class for connection types (tcp, mcast, shmem, ...) which are called carriers in YARP.
The basic state of a connection - route, streams in use, etc.
virtual TwoWayStream * giveStreams()=0
Take ownership of the streams associated with the connection.
virtual void takeStreams(TwoWayStream *streams)=0
Provide streams to be used with the connection.
Minimal requirements for an efficient Writer.