Update to version 3.10.0
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
||||
#ifdef ESP8266
|
||||
#if defined(ESP8266) || defined(TARGET_RP2040) || defined(TARGET_RP2350) || defined(PICO_RP2040) || defined(PICO_RP2350)
|
||||
#include <Hash.h>
|
||||
#ifdef CRYPTO_HASH_h // include Hash.h from espressif framework if the first include was from the crypto library
|
||||
#include <../src/Hash.h>
|
||||
@@ -184,7 +184,13 @@ public:
|
||||
};
|
||||
|
||||
class AsyncWebSocketMessage {
|
||||
friend AsyncWebSocketClient;
|
||||
|
||||
private:
|
||||
size_t _remainingBytesToSend() const {
|
||||
return _WSbuffer->size() - _sent;
|
||||
}
|
||||
|
||||
AsyncWebSocketSharedBuffer _WSbuffer;
|
||||
uint8_t _opcode{WS_TEXT};
|
||||
bool _mask{false};
|
||||
@@ -203,7 +209,7 @@ public:
|
||||
return _acked == _ack;
|
||||
}
|
||||
|
||||
void ack(size_t len, uint32_t time);
|
||||
size_t ack(size_t len, uint32_t time);
|
||||
size_t send(AsyncClient *client);
|
||||
};
|
||||
|
||||
@@ -230,6 +236,9 @@ private:
|
||||
void _runQueue();
|
||||
void _clearQueue();
|
||||
|
||||
// this function is called when a text message is received, in order to copy the buffer and place a null terminator at the end of the buffer for easier handling of text messages.
|
||||
void _handleDataEvent(uint8_t *data, size_t len, bool endOfPaquet);
|
||||
|
||||
public:
|
||||
void *_tempObject;
|
||||
|
||||
@@ -554,9 +563,6 @@ private:
|
||||
}
|
||||
} else if (type == WS_EVT_DATA) {
|
||||
AwsFrameInfo *info = (AwsFrameInfo *)arg;
|
||||
if (info->opcode == WS_TEXT) {
|
||||
data[len] = 0;
|
||||
}
|
||||
if (info->final && info->index == 0 && info->len == len) {
|
||||
if (_onMessage) {
|
||||
_onMessage(server, client, data, len);
|
||||
|
||||
Reference in New Issue
Block a user