|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
10 #ifndef YARP_OS_IMPL_HTTPCARRIER
11 #define YARP_OS_IMPL_HTTPCARRIER
79 bool isOk()
const override;
80 void reset()
override;
83 virtual void apply(
char ch);
84 void close()
override;
102 std::string url, input, prefix;
114 std::string
getName()
const override;
141 #endif // YARP_OS_IMPL_HTTPCARRIER
A stream which can be asked to perform bidirectional communication.
bool expectSenderSpecifier(ConnectionState &proto) override
Expect the name of the sending port.
Minimal http connection support.
void reset() override
Reset the stream.
A base class for connection types (tcp, mcast, shmem, ...) which are called carriers in YARP.
virtual void write(char ch)
Write a single byte to the stream.
Simple specification of the minimum functions needed from output streams.
bool expectAck(ConnectionState &proto) override
Receive an acknowledgement, if expected for this carrier.
void beginPacket() override
Mark the beginning of a logical packet.
bool sendHeader(ConnectionState &proto) override
Write a header appropriate to the carrier to the connection, followed by any carrier-specific data.
const Contact & getRemoteAddress() const override
Get the address of the remote side of the stream.
virtual ~HttpTwoWayStream()
void close() override
Terminate the stream.
OutputStream & getOutputStream() override
Get an OutputStream to write to.
An OutputStream that produces a string.
void getHeader(Bytes &header) const override
Provide 8 bytes describing this connection sufficiently to allow the other side of a connection to se...
bool sendIndex(ConnectionState &proto, SizedWriter &writer) override
bool requireAck() const override
Check if carrier has flow control, requiring sent messages to be acknowledged by recipient.
InputStream & getInputStream() override
Get an InputStream to read from.
void write(const Bytes &b) override
Write a block of bytes to the stream.
std::string getName() const override
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
bool checkHeader(const Bytes &header, const char *prefix)
Carrier * create() const override
Factory method.
bool reply(ConnectionState &proto, SizedWriter &writer) override
Communicating between two ports via TCP.
const Contact & getLocalAddress() const override
Get the address of the local side of the stream.
A simple abstraction for a block of bytes.
bool expectIndex(ConnectionState &proto) override
Expect a message header, if there is one for this carrier.
virtual void apply(char ch)
bool isOk() const override
Check if the stream is ok or in an error state.
bool write(ConnectionState &proto, SizedWriter &writer) override
Write a message.
The basic state of a connection - route, streams in use, etc.
bool isTextMode() const override
Check if carrier is textual in nature.
bool sendAck(ConnectionState &proto) override
Send an acknowledgement, if needed for this carrier.
bool respondToHeader(ConnectionState &proto) override
Respond to the header.
bool expectReplyToHeader(ConnectionState &proto) override
Process reply to header, if one is expected for this carrier.
The main, catch-all namespace for YARP.
bool supportReply() const override
This flag is used by YARP to determine whether the connection can carry RPC traffic,...
void endPacket() override
Mark the end of a logical packet (see beginPacket).
void setParameters(const Bytes &header) override
Configure this carrier based on the first 8 bytes of the connection.
Minimal requirements for an efficient Writer.
A class for storing options and configuration information.
HttpTwoWayStream(TwoWayStream *delegate, const char *txt, const char *prefix, yarp::os::Property &prop, bool writer)