diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-07-30 15:28:05 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-07-30 15:29:52 +0200 |
commit | 7adf4cc9b5de6701a41e27690a69b9892d5eed85 (patch) | |
tree | 0019e6d1b7cd993b81d5bba268074cfc4e10a213 /doc/classes/UDPServer.xml | |
parent | a1c19b9a1e53f78c75c13cb418270db80057b21a (diff) |
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.
Diffstat (limited to 'doc/classes/UDPServer.xml')
-rw-r--r-- | doc/classes/UDPServer.xml | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml index 5e2906450c..eb6d42fb0f 100644 --- a/doc/classes/UDPServer.xml +++ b/doc/classes/UDPServer.xml @@ -124,54 +124,45 @@ </tutorials> <methods> <method name="get_local_port" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the local port this server is listening to. </description> </method> <method name="is_connection_available" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if a packet with a new address/port combination was received on the socket. </description> </method> <method name="is_listening" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the socket is open and listening on a port. </description> </method> <method name="listen"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="port" type="int"> - </argument> - <argument index="1" name="bind_address" type="String" default=""*""> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="port" type="int" /> + <argument index="1" name="bind_address" type="String" default=""*"" /> <description> Starts the server by opening a UDP socket listening on the given port. You can optionally specify a [code]bind_address[/code] to only listen for packets sent to that address. See also [method PacketPeerUDP.bind]. </description> </method> <method name="poll"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> Call this method at regular intervals (e.g. inside [method Node._process]) to process new packets. And packet from known address/port pair will be delivered to the appropriate [PacketPeerUDP], any packet received from an unknown address/port pair will be added as a pending connection (see [method is_connection_available], [method take_connection]). The maximum number of pending connection is defined via [member max_pending_connections]. </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the server, closing the UDP socket if open. Will close all connected [PacketPeerUDP] accepted via [method take_connection] (remote peers will not be notified). </description> </method> <method name="take_connection"> - <return type="PacketPeerUDP"> - </return> + <return type="PacketPeerUDP" /> <description> Returns the first pending connection (connected to the appropriate address/port). Will return [code]null[/code] if no new connection is available. See also [method is_connection_available], [method PacketPeerUDP.connect_to_host]. </description> |