mirror of
https://github.com/Links2004/arduinoWebSockets.git
synced 2025-07-15 16:30:31 +02:00
allow usage of std::bind for Event callback
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
class WebSocketsClient: private WebSockets {
|
||||
public:
|
||||
|
||||
typedef void (*WebSocketClientEvent)(WStype_t type, uint8_t * payload, size_t length);
|
||||
typedef std::function<void (WStype_t type, uint8_t * payload, size_t length)> WebSocketClientEvent;
|
||||
|
||||
WebSocketsClient(void);
|
||||
~WebSocketsClient(void);
|
||||
|
@ -36,7 +36,7 @@
|
||||
class WebSocketsServer: private WebSockets {
|
||||
public:
|
||||
|
||||
typedef void (*WebSocketServerEvent)(uint8_t num, WStype_t type, uint8_t * payload, size_t length);
|
||||
typedef std::function<void (uint8_t num, WStype_t type, uint8_t * payload, size_t length)> WebSocketServerEvent;
|
||||
|
||||
WebSocketsServer(uint16_t port);
|
||||
~WebSocketsServer(void);
|
||||
|
Reference in New Issue
Block a user