6#ifndef WEBSOCKETCARRIER_H
7#define WEBSOCKETCARRIER_H
9#include "WebSocket/WebSocket.h"
36 std::string
getName()
const override;
55 static constexpr size_t header_lenght {8};
bool expectReplyToHeader(ConnectionState &proto) override
Process reply to header, if one is expected for this carrier.
bool expectAck(ConnectionState &proto) override
Receive an acknowledgement, if expected for this carrier.
bool expectIndex(ConnectionState &proto) override
Expect a message header, if there is one for this carrier.
bool expectSenderSpecifier(ConnectionState &proto) override
Expect the name of the sending port.
Carrier * create() const override
Factory method.
bool isTextMode() const override
Check if carrier is textual in nature.
void getHeader(Bytes &header) const override
Provide 8 bytes describing this connection sufficiently to allow the other side of a connection to se...
bool sendHeader(ConnectionState &proto) override
Write a header appropriate to the carrier to the connection, followed by any carrier-specific data.
bool canOffer() const override
Check if writing is implemented for this carrier.
std::string getName() const override
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
bool write(ConnectionState &proto, yarp::os::SizedWriter &writer) override
Write a message.
bool sendIndex(ConnectionState &proto, SizedWriter &writer) override
bool sendAck(ConnectionState &proto) override
Send an acknowledgement, if needed for this carrier.
bool checkHeader(const Bytes &header) override
Given the first 8 bytes received on a connection, decide if this is the right carrier type to use for...
bool supportReply() const override
This flag is used by YARP to determine whether the connection can carry RPC traffic,...
bool requireAck() const override
Check if carrier has flow control, requiring sent messages to be acknowledged by recipient.
bool respondToHeader(ConnectionState &proto) override
Respond to the header.
A mini-server for performing network communication in the background.
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.
Minimal requirements for an efficient Writer.
Communicating between two ports via TCP.
The components from which ports and connections are built.
An interface to the operating system, including Port based communication.