base-station/Firmware/lib/WebsocketCommunicator/WebsocketCommunicator.h

18 lines
525 B
C
Raw Normal View History

#include <Communicator.h>
#include <ESPAsyncWebServer.h>
class WebsocketCommunicator : public Communicator
{
private:
void handleMessage(void *arg, uint8_t *data, size_t len);
protected:
AsyncWebSocket &socket;
AsyncWebServer &server;
public:
WebsocketCommunicator(AsyncWebSocket &socket, AsyncWebServer &server, __SIZE_TYPE__ bufferSize);
void sendMessage(int *values, __SIZE_TYPE__ numberOfValues) override;
void sendMessage(const char message[]) override;
char *receiveMessage() override;
};