File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 70
70
#define NETWORK_ESP8266 (1 )
71
71
#define NETWORK_W5100 (2 )
72
72
#define NETWORK_ENC28J60 (3 )
73
+ #define NETWORK_ESP32 (4 )
73
74
74
75
// max size of the WS Message Header
75
76
#define WEBSOCKETS_MAX_HEADER_SIZE (14 )
80
81
#define WEBSOCKETS_NETWORK_TYPE NETWORK_ESP8266
81
82
// #define WEBSOCKETS_NETWORK_TYPE NETWORK_ESP8266_ASYNC
82
83
// #define WEBSOCKETS_NETWORK_TYPE NETWORK_W5100
84
+ #elif defined(ESP32)
85
+ #define WEBSOCKETS_NETWORK_TYPE NETWORK_ESP32
83
86
#else
84
87
#define WEBSOCKETS_NETWORK_TYPE NETWORK_W5100
85
88
#endif
137
140
#define WEBSOCKETS_NETWORK_CLASS UIPClient
138
141
#define WEBSOCKETS_NETWORK_SERVER_CLASS UIPServer
139
142
143
+ #elif (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP32)
144
+
145
+ #include < WiFi.h>
146
+ #include < WiFiClientSecure.h>
147
+ #define WEBSOCKETS_NETWORK_CLASS WiFiClient
148
+ #define WEBSOCKETS_NETWORK_SERVER_CLASS WiFiServer
149
+
140
150
#else
141
151
#error "no network type selected!"
142
152
#endif
@@ -201,7 +211,7 @@ typedef struct {
201
211
202
212
bool isSocketIO; // /< client for socket.io server
203
213
204
- #if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266)
214
+ #if (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP8266) || (WEBSOCKETS_NETWORK_TYPE == NETWORK_ESP32)
205
215
bool isSSL; // /< run in ssl mode
206
216
WiFiClientSecure * ssl;
207
217
#endif
You can’t perform that action at this time.
0 commit comments