File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -341,7 +341,7 @@ void WebSockets::handleWebsocketCb(WSclient_t * client) {
341
341
buffer++;
342
342
343
343
if (header->payloadLen == 126 ) {
344
- headerLen += 4 ;
344
+ headerLen += 2 ;
345
345
if (!handleWebsocketWaitFor (client, headerLen)) {
346
346
return ;
347
347
}
Original file line number Diff line number Diff line change 53
53
#define WEBSOCKETS_MAX_HEADER_SIZE (14 )
54
54
55
55
// select Network type based
56
- #ifdef ESP8266
57
- #define WEBSOCKETS_NETWORK_TYPE NETWORK_ESP8266
58
- // #define WEBSOCKETS_NETWORK_TYPE NETWORK_ESP8266_ASYNC
56
+ #if defined( ESP8266) || defined(ESP31B)
57
+ // #define WEBSOCKETS_NETWORK_TYPE NETWORK_ESP8266
58
+ #define WEBSOCKETS_NETWORK_TYPE NETWORK_ESP8266_ASYNC
59
59
#else
60
60
#define WEBSOCKETS_NETWORK_TYPE NETWORK_W5100
61
61
#endif
66
66
// No SSL/WSS support for client in Async mode
67
67
// TLS lib need a sync interface!
68
68
69
- #ifndef ESP8266
69
+ #if !defined( ESP8266) && !defined(ESP31B)
70
70
#error "network type ESP8266 ASYNC only possible on the ESP mcu!"
71
71
#endif
72
72
73
+ #ifdef ESP8266
73
74
#include < ESP8266WiFi.h>
75
+ #else
76
+ #include < ESP31BWiFi.h>
77
+ #endif
74
78
#include < ESPAsyncTCP.h>
75
79
#include < ESPAsyncTCPbuffer.h>
76
80
#define WEBSOCKETS_NETWORK_CLASS AsyncTCPbuffer
77
81
#define WEBSOCKETS_NETWORK_SERVER_CLASS AsyncServer
78
82
79
83
#elif (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
80
84
81
- #ifndef ESP8266
85
+ #if !defined( ESP8266) && !defined(ESP31B)
82
86
#error "network type ESP8266 only possible on the ESP mcu!"
83
87
#endif
84
88
89
+ #ifdef ESP8266
85
90
#include < ESP8266WiFi.h>
91
+ #else
92
+ #include < ESP31BWiFi.h>
93
+ #endif
86
94
#define WEBSOCKETS_NETWORK_CLASS WiFiClient
87
95
#define WEBSOCKETS_NETWORK_SERVER_CLASS WiFiServer
88
96
You can’t perform that action at this time.
0 commit comments