allow usage of std::bind for Event callback

This commit is contained in:
Markus Sattler
2016-01-11 10:37:27 +01:00
parent 21e959c013
commit cf7652a371
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);