summaryrefslogtreecommitdiff
path: root/modules/websocket/doc_classes/WebSocketPeer.xml
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-09-24 01:49:09 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-09-24 01:50:37 +0200
commitdf43b94e6ebaad30991e7b909f40cd89aee9d6fd (patch)
tree384a64093351ad6c8db4e20fcde8b3403404e9fe /modules/websocket/doc_classes/WebSocketPeer.xml
parent4b92956db7cb479a1c3ee63f102f9866fbbc6fef (diff)
Update WebSocket documentation
Diffstat (limited to 'modules/websocket/doc_classes/WebSocketPeer.xml')
-rw-r--r--modules/websocket/doc_classes/WebSocketPeer.xml8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/websocket/doc_classes/WebSocketPeer.xml b/modules/websocket/doc_classes/WebSocketPeer.xml
index 85a08e0c0b..cc59706916 100644
--- a/modules/websocket/doc_classes/WebSocketPeer.xml
+++ b/modules/websocket/doc_classes/WebSocketPeer.xml
@@ -15,8 +15,14 @@
<method name="close">
<return type="void">
</return>
+ <argument index="0" name="code" type="int" default="1000">
+ </argument>
+ <argument index="1" name="reason" type="String" default="&quot;&quot;">
+ </argument>
<description>
- Close this WebSocket connection, actively disconnecting the peer.
+ Close this WebSocket connection. [code]code[/code] is the status code for the closure (see RFC6455 section 7.4 for a list of valid status codes). [reason] is the human readable reason for closing the connection (can be any UTF8 string, must be less than 123 bytes).
+ Note: To achieve a clean close, you will need to keep polling until either [signal WebSocketClient.connection_closed] or [signal WebSocketServer.client_disconnected] is received.
+ Note: HTML5 export might not support all status codes. Please refer to browsers-specific documentation for more details.
</description>
</method>
<method name="get_connected_host" qualifiers="const">