diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-09-23 21:14:20 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-09-24 01:50:37 +0200 |
commit | 5d91e87c64f757fb1c20f43a0a30db3c73073625 (patch) | |
tree | 29000bb4eabc80bb8f208d71bafd6291d9df9868 /modules/websocket/websocket_client.h | |
parent | 399910ddd82e84f078ebefb3ed2c51d2ef989235 (diff) |
Implement WebSocket close notify.
Diffstat (limited to 'modules/websocket/websocket_client.h')
-rw-r--r-- | modules/websocket/websocket_client.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/websocket/websocket_client.h b/modules/websocket/websocket_client.h index 6165f37d40..086e90318f 100644 --- a/modules/websocket/websocket_client.h +++ b/modules/websocket/websocket_client.h @@ -53,7 +53,7 @@ public: virtual void poll() = 0; virtual Error connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, PoolVector<String> p_protocol = PoolVector<String>()) = 0; - virtual void disconnect_from_host() = 0; + virtual void disconnect_from_host(int p_code = 1000, String p_reason = "") = 0; virtual IP_Address get_connected_host() const = 0; virtual uint16_t get_connected_port() const = 0; @@ -62,6 +62,7 @@ public: void _on_peer_packet(); void _on_connect(String p_protocol); + void _on_close_request(int p_code, String p_reason); void _on_disconnect(); void _on_error(); |