File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change 14
14
#elif defined(ESP32)
15
15
#include < WiFi.h>
16
16
#include < WiFiMulti.h>
17
+ #include < WiFiClientSecure.h>
17
18
WiFiMulti WiFiMulti;
18
19
19
20
HardwareSerial Serial1 (2 );
20
21
#endif
21
22
22
23
#include < WebSocketsClient.h>
24
+
23
25
#include < Hash.h>
24
26
25
27
WebSocketsClient webSocket;
26
28
27
29
#define USE_SERIAL Serial1
28
30
29
- #ifndef ESP8266
30
- void hexdump (const void *mem, uint32_t len, uint8_t cols = 16 );
31
- #endif
32
-
33
31
void webSocketEvent (WStype_t type, uint8_t * payload, size_t length) {
34
32
35
33
switch (type) {
@@ -103,7 +101,6 @@ void loop() {
103
101
}
104
102
105
103
106
-
107
104
#ifndef ESP8266
108
105
void hexdump (const void *mem, uint32_t len, uint8_t cols) {
109
106
const uint8_t * src = (const uint8_t *) mem;
Original file line number Diff line number Diff line change 48
48
#define NODEBUG_WEBSOCKETS
49
49
#endif
50
50
51
- #ifdef ESP8266
51
+ #if defined( ESP8266) || defined(ESP32)
52
52
#define WEBSOCKETS_MAX_DATA_SIZE (15 *1024 )
53
53
#define WEBSOCKETS_USE_BIG_MEM
54
54
#define GET_FREE_HEAP ESP.getFreeHeap()
78
78
// max size of the WS Message Header
79
79
#define WEBSOCKETS_MAX_HEADER_SIZE (14 )
80
80
81
- #if !defined(WEBSOCKETS_NETWORK_TYPE)
81
+ #if !defined(WEBSOCKETS_NETWORK_TYPE)
82
82
// select Network type based
83
83
#if defined(ESP8266) || defined(ESP31B)
84
84
#define WEBSOCKETS_NETWORK_TYPE NETWORK_ESP8266
97
97
// No SSL/WSS support for client in Async mode
98
98
// TLS lib need a sync interface!
99
99
100
- #if !defined(ESP8266) && !defined(ESP31B)
100
+ #if !defined(ESP8266) && !defined(ESP31B) && !defined(ESP32)
101
101
#error "network type ESP8266 ASYNC only possible on the ESP mcu!"
102
102
#endif
103
103
You can’t perform that action at this time.
0 commit comments