6#ifndef YARP_WEBSOCKSTREAM_H
7#define YARP_WEBSOCKSTREAM_H
9#include "WebSocket/WebSocket.h"
33 void close()
override;
55 bool isOk()
const override;
57 void reset()
override;
66 size_t currentHead {0};
83 static void makeFrame(WebSocketFrameType frame_type,
void reset() override
Reset the stream.
const yarp::os::Contact & getLocalAddress() const override
Get the address of the local side of the stream.
void beginPacket() override
Mark the beginning of a logical packet.
~WebSocketStream() override
void endPacket() override
Mark the end of a logical packet (see beginPacket).
void write(const yarp::os::Bytes &bytesToWrite) override
Write a block of bytes to the stream.
void interrupt() override
Interrupt the stream.
void close() override
Terminate the stream.
OutputStream & getOutputStream() override
Get an OutputStream to write to.
const yarp::os::Contact & getRemoteAddress() const override
Get the address of the remote side of the stream.
InputStream & getInputStream() override
Get an InputStream to read from.
bool isOk() const override
Check if the stream is ok or in an error state.
A simple abstraction for a block of bytes.
An abstraction for a block of bytes, with optional responsibility for allocating/destroying that bloc...
Simple specification of the minimum functions needed from output streams.
virtual void write(char ch)
Write a single byte to the stream.
A stream which can be asked to perform bidirectional communication.