8000 Merge remote-tracking branch 'Links2004/master' · Links2004/arduinoWebSockets@c88050b · GitHub
[go: up one dir, main page]

Skip to content

Commit c88050b

Browse files
author
Me No Dev
committed
Merge remote-tracking branch 'Links2004/master'
2 parents 005441d + b3efb31 commit c88050b

File tree

12 files changed

+862
-332
lines changed

12 files changed

+862
-332
lines changed

README.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,37 @@ a WebSocket Server and Client for Arduino based on RFC6455.
1818
- max input length is limited to the ram size and the ```WEBSOCKETS_MAX_DATA_SIZE``` define
1919
- max output length has no limit (the hardware is the limit)
2020
- Client send big frames with mask 0x00000000 (on AVR all frames)
21-
21+
22+
##### Limitations for Async #####
23+
- Functions called from within the context of the websocket event might not honor `yield()` and/or `delay()`. See [this issue](https://github.com/Links2004/arduinoWebSockets/issues/58#issuecomment-192376395) for more info and a potential workaround.
24+
- wss / SSL is not possible.
25+
2226
##### Supported Hardware #####
2327
- ESP8266 [Arduino for ESP8266](https://github.com/Links2004/Arduino)
24-
- ATmega328 with Ethernet Shield (alpha)
25-
- ATmega328 with enc28j60 (alpha)
26-
- ATmega2560 with Ethernet Shield (alpha)
27-
- ATmega2560 with enc28j60 (alpha)
28+
- ESP31B
29+
- ATmega328 with Ethernet Shield (ATmega branch)
30+
- ATmega328 with enc28j60 (ATmega branch)
31+
- ATmega2560 with Ethernet Shield (ATmega branch)
32+
- ATmega2560 with enc28j60 (ATmega branch)
33+
34+
###### Note: ######
35+
36+
version 2.0 and up is not compatible with AVR/ATmega, check ATmega branch.
37+
38+
Arduino for AVR not supports std namespace of c++.
2839

2940
### wss / SSL ###
3041
supported for:
3142
- wss client on the ESP8266
3243

44+
### ESP Async TCP ###
45+
46+
This libary can run in Async TCP mode on the ESP.
47+
48+
The mode can be aktivated in the ```WebSockets.h``` (see WEBSOCKETS_NETWORK_TYPE define).
49+
50+
[ESPAsyncTCP](https://github.com/me-no-dev/ESPAsyncTCP) libary is required.
51+
3352
### Issues ###
3453
Submit issues to: https://github.com/Links2004/arduinoWebSockets/issues
3554

examples/WebSocketClient/WebSocketClient.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ void setup() {
7777
}
7878

7979
webSocket.begin("192.168.0.123", 81);
80+
//webSocket.setAuthorization("user", "Password"); // HTTP Basic Authorization
8081
webSocket.onEvent(webSocketEvent);
8182

8283
}

examples/WebSocketClientSSL/WebSocketClientSSL.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ WebSocketsClient webSocket;
2222

2323
#define USE_SERIAL Serial1
2424

25-
void webSocketEvent(WStype_t type, uint8_t * payload, size_t lenght) {
25+
void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) {
2626

2727

2828
switch(type) {
@@ -44,11 +44,11 @@ void webSocketEvent(WStype_t type, uint8_t * payload, size_t lenght) {
4444
// webSocket.sendTXT("message here");
4545
break;
4646
case WStype_BIN:
47-
USE_SERIAL.printf("[WSc] get binary lenght: %u\n", lenght);
48-
hexdump(payload, lenght);
47+
USE_SERIAL.printf("[WSc] get binary length: %u\n", length);
48+
hexdump(payload, length);
4949

5050
// send data to server
51-
// webSocket.sendBIN(payload, lenght);
51+
// webSocket.sendBIN(payload, length);
5252
break;
5353
}
5454

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name=WebSockets
2-
version=1.3
2+
version=2.0.2
33
author=Markus Sattler
44
maintainer=Markus Sattler
55
sentence=WebSockets for Arduino (Server + Client)
6-
paragraph=
6+
paragraph=use 2.x.x for ESP and 1.3 for AVR
77
category=Communication
88
url=https://github.com/Links2004/arduinoWebSockets
99
architectures=*

0 commit comments

Comments
 (0)
0