1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Update WebSocket documentation

This commit is contained in:
Fabio Alessandrelli
2018-09-24 01:49:09 +02:00
parent 4b92956db7
commit df43b94e6e
3 changed files with 44 additions and 6 deletions

View File

@@ -31,8 +31,12 @@
<method name="disconnect_from_host">
<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>
Disconnect from the server if currently connected.
Disconnect this client from the connected host. See [method WebSocketPeer.close] for more info.
</description>
</method>
</methods>
@@ -43,8 +47,10 @@
</members>
<signals>
<signal name="connection_closed">
<argument index="0" name="was_clean_close" type="bool">
</argument>
<description>
Emitted when the connection to the server is closed.
Emitted when the connection to the server is closed. [code]was_clean_close[/code] will be [code]true[/code] if the connection was shutdown cleanly.
</description>
</signal>
<signal name="connection_error">
@@ -64,6 +70,15 @@
Emitted when a WebSocket message is received. Note: This signal is NOT emitted when used as high level multiplayer peer.
</description>
</signal>
<signal name="server_close_request">
<argument index="0" name="code" type="int">
</argument>
<argument index="1" name="reason" type="String">
</argument>
<description>
Emitted when the server requests a clean close. You should keep polling until you get a [signal connection_closed] signal to achieve the clean close. See [method WebSocketPeer.close] for more details.
</description>
</signal>
</signals>
<constants>
</constants>