mirror of
https://github.com/Links2004/arduinoWebSockets.git
synced 2025-07-16 00:32:06 +02:00
add support for setting:
- Access-Control-Allow-Origin (#25) - Sec-WebSocket-Protocol () add _server->close(); for ESP
This commit is contained in:
@ -38,7 +38,7 @@ public:
|
||||
|
||||
typedef std::function<void (uint8_t num, WStype_t type, uint8_t * payload, size_t length)> WebSocketServerEvent;
|
||||
|
||||
WebSocketsServer(uint16_t port);
|
||||
WebSocketsServer(uint16_t port, String origin = "", String protocol = "arduino");
|
||||
~WebSocketsServer(void);
|
||||
|
||||
void begin(void);
|
||||
@ -74,6 +74,8 @@ public:
|
||||
|
||||
protected:
|
||||
uint16_t _port;
|
||||
String _origin;
|
||||
String _protocol;
|
||||
|
||||
WEBSOCKETS_NETWORK_SERVER_CLASS * _server;
|
||||
|
||||
|
Reference in New Issue
Block a user