15 #ifndef SMINGCORE_NETWORK_WEBSOCKETFRAME_H_ 16 #define SMINGCORE_NETWORK_WEBSOCKETFRAME_H_ 17 #include "../Wiring/WiringFrameworkIncludes.h" 38 static const uint8_t payloadDeleteMemBit = 1u;
39 static const uint8_t headerDeleteMemBit = 2u;
52 friend class Websocket;
57 uint8_t encodeFrame(
WSFrameType frameType, uint8_t * payload,
size_t length, uint8_t mask, uint8_t fin, uint8_t headerToPayload =
true);
71 uint8_t decodeFrame(uint8_t * buffer,
size_t length);
81 uint8_t* _payload =
nullptr;
82 size_t _payloadLength = 0;
83 uint8_t* _header =
nullptr;
84 size_t _headerLength = 0;
87 uint8_t _getFrameSizes(uint8_t* buffer,
size_t length);
90 size_t _nextReadOffset = 0;
Definition: WebsocketFrame.h:36
xB-F are reserved for further control frame
WSFrameType
Websocket frame types enum.
Definition: WebsocketFrame.h:21
Websocket Frame.
Definition: WebsocketFrame.h:49
Definition: HttpServer.h:30
Delegate callback type for connection of websocket client.
Definition: WebsocketClient.h:53