|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
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) {
211 #endif // YARP_XMLRPC_CARRIER_XMLRPCCARRIER_H
bool expectExtraHeader(yarp::os::ConnectionState &proto) override
Receive any carrier-specific header.
bool respondToHeader(yarp::os::ConnectionState &proto) override
Respond to the header.
std::string getName() const override
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
Carrier * create() const override
Factory method.
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 isConnectionless() const override
Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp).
A base class for connection types (tcp, mcast, shmem, ...) which are called carriers in YARP.
bool isTextMode() const override
Check if carrier is textual in nature.
virtual TwoWayStream * giveStreams()=0
Take ownership of the streams associated with the connection.
bool expectSenderSpecifier(yarp::os::ConnectionState &proto) override
Expect the name of the sending port.
void setParameters(const yarp::os::Bytes &header) override
Configure this carrier based on the first 8 bytes of the connection.
bool supportReply() const override
This flag is used by YARP to determine whether the connection can carry RPC traffic,...
bool canAccept() const override
Check if reading is implemented for this carrier.
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 isActive() const override
Check if carrier is alive and error free.
virtual void takeStreams(TwoWayStream *streams)=0
Provide streams to be used with the connection.
bool expectReplyToHeader(yarp::os::ConnectionState &proto) override
Process reply to header, if one is expected for this carrier.
bool expectIndex(yarp::os::ConnectionState &proto) override
Expect a message header, if there is one for this carrier.
std::string toString() const override
Get name of carrier.
A simple abstraction for a block of bytes.
bool requireAck() const override
Check if carrier has flow control, requiring sent messages to be acknowledged by recipient.
This carrier enables XML/RPC message transmission.
bool sendAck(yarp::os::ConnectionState &proto) override
Send an acknowledgement, if needed for this carrier.
The basic state of a connection - route, streams in use, etc.
bool canEscape() const override
Check if carrier can encode administrative messages, as opposed to just user data.
bool write(yarp::os::ConnectionState &proto, yarp::os::SizedWriter &writer) override
Write a message.
bool reply(yarp::os::ConnectionState &proto, yarp::os::SizedWriter &writer) override
bool prepareSend(yarp::os::ConnectionState &proto) override
Perform any initialization needed before writing on a connection.
bool expectAck(yarp::os::ConnectionState &proto) override
Receive an acknowledgement, if expected for this carrier.
bool sendHeader(yarp::os::ConnectionState &proto) override
Write a header appropriate to the carrier to the connection, followed by any carrier-specific data.
bool isLocal() const override
Check if carrier operates within a single process.
virtual bool sendIndex(yarp::os::ConnectionState &proto, yarp::os::SizedWriter &writer)
Minimal requirements for an efficient Writer.
bool canOffer() const override
Check if writing is implemented for this carrier.
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...