29#include "WSProtocol.h"
43 enum class OpCode : uint8_t
61 void decode(
const char* incomingData);
84 uint32_t m_status {0};
86 bool m_finalMessage {
true};
107 void replyCloseConnectionRequest(uint16_t statusCode,
const String& closeReason);
113 const std::map<String, String> m_headers;
Definition: RequestInfo.h:42
Definition: TCPSocket.h:165
Definition: WSWebSocketsProtocol.h:118
Definition: WSWebSocketsProtocol.h:111
Abstract base class for different protocols used in Web Service servers.
Definition: WSProtocol.h:40
Definition: WSWebSocketsProtocol.h:41
Definition: WSWebSocketsProtocol.h:95
RequestInfo process() override
bool isFinal() const
'message is final' flag
void decode(const char *incomingData)
const Buffer & payload() const
Return message payload buffer.
OpCode opcode() const
Get operation code.
void opcode(OpCode code)
Set operation code.
static void encode(const String &payload, OpCode opcode, bool finalMessage, Buffer &output)
WSWebSocketsMessage()=default
Default constructor.
WSWebSocketsProtocol(TCPSocket *socket, const HttpHeaders &headers)
uint32_t statusCode() const
Operation status code.