mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
doc: Use self-closing tags for return and argument
For the time being we don't support writing a description for those, preferring having all details in the method's description. Using self-closing tags saves half the lines, and prevents contributors from thinking that they should write the argument or return documentation there.
This commit is contained in:
@@ -11,12 +11,9 @@
|
||||
</tutorials>
|
||||
<methods>
|
||||
<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="""">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="code" type="int" default="1000" />
|
||||
<argument index="1" name="reason" type="String" default="""" />
|
||||
<description>
|
||||
Closes this WebSocket connection. [code]code[/code] is the status code for the closure (see RFC 6455 section 7.4 for a list of valid status codes). [code]reason[/code] is the human readable reason for closing the connection (can be any UTF-8 string that's smaller than 123 bytes).
|
||||
[b]Note:[/b] To achieve a clean close, you will need to keep polling until either [signal WebSocketClient.connection_closed] or [signal WebSocketServer.client_disconnected] is received.
|
||||
@@ -24,57 +21,48 @@
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_connected_host" qualifiers="const">
|
||||
<return type="String">
|
||||
</return>
|
||||
<return type="String" />
|
||||
<description>
|
||||
Returns the IP address of the connected peer.
|
||||
[b]Note:[/b] Not available in the HTML5 export.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_connected_port" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
<return type="int" />
|
||||
<description>
|
||||
Returns the remote port of the connected peer.
|
||||
[b]Note:[/b] Not available in the HTML5 export.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_write_mode" qualifiers="const">
|
||||
<return type="int" enum="WebSocketPeer.WriteMode">
|
||||
</return>
|
||||
<return type="int" enum="WebSocketPeer.WriteMode" />
|
||||
<description>
|
||||
Gets the current selected write mode. See [enum WriteMode].
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_connected_to_host" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if this peer is currently connected.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_no_delay">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="enabled" type="bool">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="enabled" type="bool" />
|
||||
<description>
|
||||
Disable Nagle's algorithm on the underling TCP socket (default). See [method StreamPeerTCP.set_no_delay] for more information.
|
||||
[b]Note:[/b] Not available in the HTML5 export.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_write_mode">
|
||||
<return type="void">
|
||||
</return>
|
||||
<argument index="0" name="mode" type="int" enum="WebSocketPeer.WriteMode">
|
||||
</argument>
|
||||
<return type="void" />
|
||||
<argument index="0" name="mode" type="int" enum="WebSocketPeer.WriteMode" />
|
||||
<description>
|
||||
Sets the socket to use the given [enum WriteMode].
|
||||
</description>
|
||||
</method>
|
||||
<method name="was_string_packet" qualifiers="const">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if the last received packet was sent as a text payload. See [enum WriteMode].
|
||||
</description>
|
||||
|
||||
Reference in New Issue
Block a user