10000 allow usage of std::bind for Event callback · coderGods/arduinoWebSockets@cf7652a · GitHub
[go: up one dir, main page]

Skip to content

Commit cf7652a

Browse files
committed
allow usage of std::bind for Event callback
1 parent 21e959c commit cf7652a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/WebSocketsClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
class WebSocketsClient: private WebSockets {
3232
public:
3333

34-
typedef void (*WebSocketClientEvent)(WStype_t type, uint8_t * payload, size_t length);
34+
typedef std::function<void (WStype_t type, uint8_t * payload, size_t length)> WebSocketClientEvent;
3535

3636
WebSocketsClient(void);
3737
~WebSocketsClient(void);

src/WebSocketsServer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
class WebSocketsServer: private WebSockets {
3737
public:
3838

39-
typedef void (*WebSocketServerEvent)(uint8_t num, WStype_t type, uint8_t * payload, size_t length);
39+
typedef std::function<void (uint8_t num, WStype_t type, uint8_t * payload, size_t length)> WebSocketServerEvent;
4040

4141
WebSocketsServer(uint16_t port);
4242
~WebSocketsServer(void);

0 commit comments

Comments
 (0)
0