8000 update README.md · coderGods/arduinoWebSockets@63f8675 · GitHub
[go: up one dir, main page]

Skip to content

Commit 63f8675

Browse files
committed
update README.md
1 parent b7a694c commit 63f8675

File tree

5 files changed

+33
-13
lines changed

5 files changed

+33
-13
lines changed

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,30 @@ a WebSocket Server and Client for Arduino based on RFC6455.
2121

2222
##### Supported Hardware #####
2323
- 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)
24+
- ATmega328 with Ethernet Shield (ATmega branch)
25+
- ATmega328 with enc28j60 (ATmega branch)
26+
- ATmega2560 with Ethernet Shield (ATmega branch)
27+
- ATmega2560 with enc28j60 (ATmega branch)
28+
29+
###### Note: ######
30+
31+
version 2.0 is not compatible with AVR/ATmega, check ATmega branch.
32+
33+
Arduino for AVR not supports std namespace of c++.
2834

2935
### wss / SSL ###
3036
supported for:
3137
- wss client on the ESP8266
3238

3339
### ESP Async TCP ###
3440

35-
this libary can run in Async TCP mode on the ESP8266.
36-
the mode can be aktivated in the ```WebSockets.h``` (see WEBSOCKETS_NETWORK_TYPE define).
37-
the ```ESPAsyncTCP``` libary is required.
38-
Note: in this mode wss / SSL is not posible.
41+
This libary can run in Async TCP mode on the ESP.
42+
43+
The mode can be aktivated in the ```WebSockets.h``` (see WEBSOCKETS_NETWORK_TYPE define).
44+
45+
```ESPAsyncTCP``` libary is required.
46+
47+
Note: in this mode wss / SSL is not possible.
3948

4049
### Issues ###
4150
Submit issues to: https://github.com/Links2004/arduinoWebSockets/issues

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
33
author=Markus Sattler
44
maintainer=Markus Sattler
55
sentence=WebSockets for Arduino (Server + Client)
6-
paragraph=
6+
paragraph=use 2.0 for ESP and 1.3 for AVR
77
category=Communication
88
url=https://github.com/Links2004/arduinoWebSockets
99
architectures=*

src/WebSockets.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#include <Arduino.h>
2929

30-
#define DEBUG_WEBSOCKETS(...) os_printf( __VA_ARGS__ )
30+
//#define DEBUG_WEBSOCKETS(...) os_printf( __VA_ARGS__ )
3131

3232
#ifndef DEBUG_WEBSOCKETS
3333
#define DEBUG_WEBSOCKETS(...)
@@ -182,8 +182,11 @@ typedef struct {
182182

183183
class WebSockets {
184184
protected:
185-
185+
#ifdef __AVR__
186+
typedef void (*WSreadWaitCb)(WSclient_t * client, bool ok);
187+
#else
186188
typedef std::function<void(WSclient_t * client, bool ok)> WSreadWaitCb;
189+
#endif
187190

188191
virtual void clientDisconnect(WSclient_t * client);
189192
virtual bool clientIsConnected(WSclient_t * client);

src/WebSocketsClient.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@
3030

3131
class WebSocketsClient: private WebSockets {
3232
public:
33-
33+
#ifdef __AVR__
34+
typedef void (*WebSocketClientEvent)(WStype_t type, uint8_t * payload, size_t length);
35+
#else
3436
typedef std::function<void (WStype_t type, uint8_t * payload, size_t length)> WebSocketClientEvent;
37+
#endif
38+
3539

3640
WebSocketsClient(void);
3741
~WebSocketsClient(void);

src/WebSocketsServer.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@
3636
class WebSocketsServer: private WebSockets {
3737
public:
3838

39+
#ifdef __AVR__
40+
typedef void (*WebSocketServerEvent)(uint8_t num, WStype_t type, uint8_t * payload, size_t length);
41+
#else
3942
typedef std::function<void (uint8_t num, WStype_t type, uint8_t * payload, size_t length)> WebSocketServerEvent;
43+
#endif
4044

4145
WebSocketsServer(uint16_t port, String origin = "", String protocol = "arduino");
4246
~WebSocketsServer(void);

0 commit comments

Comments
 (0)
0