8000 more ESP32 stuff · blackhack/arduinoWebSockets@f62aa64 · GitHub
[go: up one dir, main page]

Skip to content

Commit f62aa64

Browse files
committed
more ESP32 stuff
1 parent d340c89 commit f62aa64

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

example 10000 s/WebSocketClient/WebSocketClient.ino

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,20 @@
1414
#elif defined(ESP32)
1515
#include <WiFi.h>
1616
#include <WiFiMulti.h>
17+
#include <WiFiClientSecure.h>
1718
WiFiMulti WiFiMulti;
1819

1920
HardwareSerial Serial1(2);
2021
#endif
2122

2223
#include <WebSocketsClient.h>
24+
2325
#include <Hash.h>
2426

2527
WebSocketsClient webSocket;
2628

2729
#define USE_SERIAL Serial1
2830

29-
#ifndef ESP8266
30-
void hexdump(const void *mem, uint32_t len, uint8_t cols = 16);
31-
#endif
32-
3331
void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) {
3432

3533
switch(type) {
@@ -103,7 +101,6 @@ void loop() {
103101
}
104102

105103

106-
107104
#ifndef ESP8266
108105
void hexdump(const void *mem, uint32_t len, uint8_t cols) {
109106
const uint8_t* src = (const uint8_t*) mem;

src/WebSockets.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#define NODEBUG_WEBSOCKETS
4949
#endif
5050

51-
#ifdef ESP8266
51+
#if defined(ESP8266) || defined(ESP32)
5252
#define WEBSOCKETS_MAX_DATA_SIZE (15*1024)
5353
#define WEBSOCKETS_USE_BIG_MEM
5454
#define GET_FREE_HEAP ESP.getFreeHeap()
@@ -78,7 +78,7 @@
7878
// max size of the WS Message Header
7979
#define WEBSOCKETS_MAX_HEADER_SIZE (14)
8080

81-
#if !defined(WEBSOCKETS_NETWORK_TYPE)
81+
#if !defined(WEBSOCKETS_NETWORK_TYPE)
8282
// select Network type based
8383
#if defined(ESP8266) || defined(ESP31B)
8484
#define WEBSOCKETS_NETWORK_TYPE NETWORK_ESP8266
@@ -97,7 +97,7 @@
9797
// No SSL/WSS support for client in Async mode
9898
// TLS lib need a sync interface!
9999

100-
#if !defined(ESP8266) && !defined(ESP31B)
100+
#if !defined(ESP8266) && !defined(ESP31B) && !defined(ESP32)
101101
#error "network type ESP8266 ASYNC only possible on the ESP mcu!"
102102
#endif
103103

0 commit comments

Comments
 (0)
0