diff options
author | Yuri Sizov <yuris@humnom.net> | 2022-08-06 21:11:48 +0300 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2022-08-08 22:34:31 +0300 |
commit | c5d7115038de5f83cb83e08748615a84fc26bee2 (patch) | |
tree | 13b9b42aac25f7769428ef91f637e260b768f25d /modules/enet | |
parent | 35c1eae8d70eb6ae49495339b95f89bcd084c3f2 (diff) |
Rename the argument tag to param in XML documentation
Diffstat (limited to 'modules/enet')
-rw-r--r-- | modules/enet/doc_classes/ENetConnection.xml | 58 | ||||
-rw-r--r-- | modules/enet/doc_classes/ENetMultiplayerPeer.xml | 34 | ||||
-rw-r--r-- | modules/enet/doc_classes/ENetPacketPeer.xml | 28 |
3 files changed, 60 insertions, 60 deletions
diff --git a/modules/enet/doc_classes/ENetConnection.xml b/modules/enet/doc_classes/ENetConnection.xml index 14aad0cb39..c9bf1c65e1 100644 --- a/modules/enet/doc_classes/ENetConnection.xml +++ b/modules/enet/doc_classes/ENetConnection.xml @@ -12,31 +12,31 @@ <methods> <method name="bandwidth_limit"> <return type="void" /> - <argument index="0" name="in_bandwidth" type="int" default="0" /> - <argument index="1" name="out_bandwidth" type="int" default="0" /> + <param index="0" name="in_bandwidth" type="int" default="0" /> + <param index="1" name="out_bandwidth" type="int" default="0" /> <description> Adjusts the bandwidth limits of a host. </description> </method> <method name="broadcast"> <return type="void" /> - <argument index="0" name="channel" type="int" /> - <argument index="1" name="packet" type="PackedByteArray" /> - <argument index="2" name="flags" type="int" /> + <param index="0" name="channel" type="int" /> + <param index="1" name="packet" type="PackedByteArray" /> + <param index="2" name="flags" type="int" /> <description> Queues a [code]packet[/code] to be sent to all peers associated with the host over the specified [code]channel[/code]. See [ENetPacketPeer] [code]FLAG_*[/code] constants for available packet flags. </description> </method> <method name="channel_limit"> <return type="void" /> - <argument index="0" name="limit" type="int" /> + <param index="0" name="limit" type="int" /> <description> Limits the maximum allowed channels of future incoming connections. </description> </method> <method name="compress"> <return type="void" /> - <argument index="0" name="mode" type="int" enum="ENetConnection.CompressionMode" /> + <param index="0" name="mode" type="int" enum="ENetConnection.CompressionMode" /> <description> Sets the compression method used for network packets. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all. [b]Note:[/b] Most games' network design involve sending many small packets frequently (smaller than 4 KB each). If in doubt, it is recommended to keep the default compression algorithm as it works best on these small packets. @@ -45,10 +45,10 @@ </method> <method name="connect_to_host"> <return type="ENetPacketPeer" /> - <argument index="0" name="address" type="String" /> - <argument index="1" name="port" type="int" /> - <argument index="2" name="channels" type="int" default="0" /> - <argument index="3" name="data" type="int" default="0" /> + <param index="0" name="address" type="String" /> + <param index="1" name="port" type="int" /> + <param index="2" name="channels" type="int" default="0" /> + <param index="3" name="data" type="int" default="0" /> <description> Initiates a connection to a foreign [code]address[/code] using the specified [code]port[/code] and allocating the requested [code]channels[/code]. Optional [code]data[/code] can be passed during connection in the form of a 32 bit integer. [b]Note:[/b] You must call either [method create_host] or [method create_host_bound] before calling this method. @@ -56,22 +56,22 @@ </method> <method name="create_host"> <return type="int" enum="Error" /> - <argument index="0" name="max_peers" type="int" default="32" /> - <argument index="1" name="max_channels" type="int" default="0" /> - <argument index="2" name="in_bandwidth" type="int" default="0" /> - <argument index="3" name="out_bandwidth" type="int" default="0" /> + <param index="0" name="max_peers" type="int" default="32" /> + <param index="1" name="max_channels" type="int" default="0" /> + <param index="2" name="in_bandwidth" type="int" default="0" /> + <param index="3" name="out_bandwidth" type="int" default="0" /> <description> Create an ENetHost that will allow up to [code]max_peers[/code] connected peers, each allocating up to [code]max_channels[/code] channels, optionally limiting bandwidth to [code]in_bandwidth[/code] and [code]out_bandwidth[/code]. </description> </method> <method name="create_host_bound"> <return type="int" enum="Error" /> - <argument index="0" name="bind_address" type="String" /> - <argument index="1" name="bind_port" type="int" /> - <argument index="2" name="max_peers" type="int" default="32" /> - <argument index="3" name="max_channels" type="int" default="0" /> - <argument index="4" name="in_bandwidth" type="int" default="0" /> - <argument index="5" name="out_bandwidth" type="int" default="0" /> + <param index="0" name="bind_address" type="String" /> + <param index="1" name="bind_port" type="int" /> + <param index="2" name="max_peers" type="int" default="32" /> + <param index="3" name="max_channels" type="int" default="0" /> + <param index="4" name="in_bandwidth" type="int" default="0" /> + <param index="5" name="out_bandwidth" type="int" default="0" /> <description> Create an ENetHost like [method create_host] which is also bound to the given [code]bind_address[/code] and [code]bind_port[/code]. </description> @@ -84,17 +84,17 @@ </method> <method name="dtls_client_setup"> <return type="int" enum="Error" /> - <argument index="0" name="certificate" type="X509Certificate" /> - <argument index="1" name="hostname" type="String" /> - <argument index="2" name="verify" type="bool" default="true" /> + <param index="0" name="certificate" type="X509Certificate" /> + <param index="1" name="hostname" type="String" /> + <param index="2" name="verify" type="bool" default="true" /> <description> Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet clients. Call this before [method connect_to_host] to have ENet connect using DTLS with [code]certificate[/code] and [code]hostname[/code] verification. Verification can be optionally turned off via the [code]verify[/code] parameter. </description> </method> <method name="dtls_server_setup"> <return type="int" enum="Error" /> - <argument index="0" name="key" type="CryptoKey" /> - <argument index="1" name="certificate" type="X509Certificate" /> + <param index="0" name="key" type="CryptoKey" /> + <param index="1" name="certificate" type="X509Certificate" /> <description> Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet servers. Call this right after [method create_host_bound] to have ENet expect peers to connect using DTLS. </description> @@ -126,14 +126,14 @@ </method> <method name="pop_statistic"> <return type="float" /> - <argument index="0" name="statistic" type="int" enum="ENetConnection.HostStatistic" /> + <param index="0" name="statistic" type="int" enum="ENetConnection.HostStatistic" /> <description> Returns and resets host statistics. See [enum HostStatistic] for more info. </description> </method> <method name="refuse_new_connections"> <return type="void" /> - <argument index="0" name="refuse" type="bool" /> + <param index="0" name="refuse" type="bool" /> <description> Configures the DTLS server to automatically drop new connections. [b]Note:[/b] This method is only relevant after calling [method dtls_server_setup]. @@ -141,7 +141,7 @@ </method> <method name="service"> <return type="Array" /> - <argument index="0" name="timeout" type="int" default="0" /> + <param index="0" name="timeout" type="int" default="0" /> <description> Waits for events on the host specified and shuttles packets between the host and its peers. The returned [Array] will have 4 elements. An [enum EventType], the [ENetPacketPeer] which generated the event, the event associated data (if any), the event associated channel (if any). If the generated event is [constant EVENT_RECEIVE], the received packet will be queued to the associated [ENetPacketPeer]. Call this function regularly to handle connections, disconnections, and to receive new packets. diff --git a/modules/enet/doc_classes/ENetMultiplayerPeer.xml b/modules/enet/doc_classes/ENetMultiplayerPeer.xml index 2ecf6b4122..5181ae76ce 100644 --- a/modules/enet/doc_classes/ENetMultiplayerPeer.xml +++ b/modules/enet/doc_classes/ENetMultiplayerPeer.xml @@ -14,8 +14,8 @@ <methods> <method name="add_mesh_peer"> <return type="int" enum="Error" /> - <argument index="0" name="peer_id" type="int" /> - <argument index="1" name="host" type="ENetConnection" /> + <param index="0" name="peer_id" type="int" /> + <param index="1" name="host" type="ENetConnection" /> <description> Add a new remote peer with the given [code]peer_id[/code] connected to the given [code]host[/code]. [b]Note:[/b] The [code]host[/code] must have exactly one peer in the [constant ENetPacketPeer.STATE_CONNECTED] state. @@ -23,51 +23,51 @@ </method> <method name="close_connection"> <return type="void" /> - <argument index="0" name="wait_usec" type="int" default="100" /> + <param index="0" name="wait_usec" type="int" default="100" /> <description> Closes the connection. Ignored if no connection is currently established. If this is a server it tries to notify all clients before forcibly disconnecting them. If this is a client it simply closes the connection to the server. </description> </method> <method name="create_client"> <return type="int" enum="Error" /> - <argument index="0" name="address" type="String" /> - <argument index="1" name="port" type="int" /> - <argument index="2" name="channel_count" type="int" default="0" /> - <argument index="3" name="in_bandwidth" type="int" default="0" /> - <argument index="4" name="out_bandwidth" type="int" default="0" /> - <argument index="5" name="local_port" type="int" default="0" /> + <param index="0" name="address" type="String" /> + <param index="1" name="port" type="int" /> + <param index="2" name="channel_count" type="int" default="0" /> + <param index="3" name="in_bandwidth" type="int" default="0" /> + <param index="4" name="out_bandwidth" type="int" default="0" /> + <param index="5" name="local_port" type="int" default="0" /> <description> Create client that connects to a server at [code]address[/code] using specified [code]port[/code]. The given address needs to be either a fully qualified domain name (e.g. [code]"www.example.com"[/code]) or an IP address in IPv4 or IPv6 format (e.g. [code]"192.168.1.1"[/code]). The [code]port[/code] is the port the server is listening on. The [code]channel_count[/code] parameter can be used to specify the number of ENet channels allocated for the connection. The [code]in_bandwidth[/code] and [code]out_bandwidth[/code] parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns [constant OK] if a client was created, [constant ERR_ALREADY_IN_USE] if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call [method close_connection] first) or [constant ERR_CANT_CREATE] if the client could not be created. If [code]local_port[/code] is specified, the client will also listen to the given port; this is useful for some NAT traversal techniques. </description> </method> <method name="create_mesh"> <return type="int" enum="Error" /> - <argument index="0" name="unique_id" type="int" /> + <param index="0" name="unique_id" type="int" /> <description> Initialize this [MultiplayerPeer] in mesh mode. The provided [code]unique_id[/code] will be used as the local peer network unique ID once assigned as the [member MultiplayerAPI.multiplayer_peer]. In the mesh configuration you will need to set up each new peer manually using [ENetConnection] before calling [method add_mesh_peer]. While this technique is more advanced, it allows for better control over the connection process (e.g. when dealing with NAT punch-through) and for better distribution of the network load (which would otherwise be more taxing on the server). </description> </method> <method name="create_server"> <return type="int" enum="Error" /> - <argument index="0" name="port" type="int" /> - <argument index="1" name="max_clients" type="int" default="32" /> - <argument index="2" name="max_channels" type="int" default="0" /> - <argument index="3" name="in_bandwidth" type="int" default="0" /> - <argument index="4" name="out_bandwidth" type="int" default="0" /> + <param index="0" name="port" type="int" /> + <param index="1" name="max_clients" type="int" default="32" /> + <param index="2" name="max_channels" type="int" default="0" /> + <param index="3" name="in_bandwidth" type="int" default="0" /> + <param index="4" name="out_bandwidth" type="int" default="0" /> <description> Create server that listens to connections via [code]port[/code]. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use [method set_bind_ip]. The default IP is the wildcard [code]"*"[/code], which listens on all available interfaces. [code]max_clients[/code] is the maximum number of clients that are allowed at once, any number up to 4095 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see [method create_client]. Returns [constant OK] if a server was created, [constant ERR_ALREADY_IN_USE] if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call [method close_connection] first) or [constant ERR_CANT_CREATE] if the server could not be created. </description> </method> <method name="get_peer" qualifiers="const"> <return type="ENetPacketPeer" /> - <argument index="0" name="id" type="int" /> + <param index="0" name="id" type="int" /> <description> Returns the [ENetPacketPeer] associated to the given [code]id[/code]. </description> </method> <method name="set_bind_ip"> <return type="void" /> - <argument index="0" name="ip" type="String" /> + <param index="0" name="ip" type="String" /> <description> The IP used when creating a server. This is set to the wildcard [code]"*"[/code] by default, which binds to all available interfaces. The given IP needs to be in IPv4 or IPv6 address format, for example: [code]"192.168.1.1"[/code]. </description> diff --git a/modules/enet/doc_classes/ENetPacketPeer.xml b/modules/enet/doc_classes/ENetPacketPeer.xml index 5de5a60853..46008317a2 100644 --- a/modules/enet/doc_classes/ENetPacketPeer.xml +++ b/modules/enet/doc_classes/ENetPacketPeer.xml @@ -26,7 +26,7 @@ </method> <method name="get_statistic"> <return type="float" /> - <argument index="0" name="statistic" type="int" enum="ENetPacketPeer.PeerStatistic" /> + <param index="0" name="statistic" type="int" enum="ENetPacketPeer.PeerStatistic" /> <description> Returns the requested [code]statistic[/code] for this peer. See [enum PeerStatistic]. </description> @@ -39,21 +39,21 @@ </method> <method name="peer_disconnect"> <return type="void" /> - <argument index="0" name="data" type="int" default="0" /> + <param index="0" name="data" type="int" default="0" /> <description> Request a disconnection from a peer. An [constant ENetConnection.EVENT_DISCONNECT] will be generated during [method ENetConnection.service] once the disconnection is complete. </description> </method> <method name="peer_disconnect_later"> <return type="void" /> - <argument index="0" name="data" type="int" default="0" /> + <param index="0" name="data" type="int" default="0" /> <description> Request a disconnection from a peer, but only after all queued outgoing packets are sent. An [constant ENetConnection.EVENT_DISCONNECT] will be generated during [method ENetConnection.service] once the disconnection is complete. </description> </method> <method name="peer_disconnect_now"> <return type="void" /> - <argument index="0" name="data" type="int" default="0" /> + <param index="0" name="data" type="int" default="0" /> <description> Force an immediate disconnection from a peer. No [constant ENetConnection.EVENT_DISCONNECT] will be generated. The foreign peer is not guaranteed to receive the disconnect notification, and is reset immediately upon return from this function. </description> @@ -66,7 +66,7 @@ </method> <method name="ping_interval"> <return type="void" /> - <argument index="0" name="ping_interval" type="int" /> + <param index="0" name="ping_interval" type="int" /> <description> Sets the [code]ping_interval[/code] in milliseconds at which pings will be sent to a peer. Pings are used both to monitor the liveness of the connection and also to dynamically adjust the throttle during periods of low traffic so that the throttle has reasonable responsiveness during traffic spikes. </description> @@ -79,18 +79,18 @@ </method> <method name="send"> <return type="int" enum="Error" /> - <argument index="0" name="channel" type="int" /> - <argument index="1" name="packet" type="PackedByteArray" /> - <argument index="2" name="flags" type="int" /> + <param index="0" name="channel" type="int" /> + <param index="1" name="packet" type="PackedByteArray" /> + <param index="2" name="flags" type="int" /> <description> Queues a [code]packet[/code] to be sent over the specified [code]channel[/code]. See [code]FLAG_*[/code] constants for available packet flags. </description> </method> <method name="set_timeout"> <return type="void" /> - <argument index="0" name="timeout" type="int" /> - <argument index="1" name="timeout_min" type="int" /> - <argument index="2" name="timeout_max" type="int" /> + <param index="0" name="timeout" type="int" /> + <param index="1" name="timeout_min" type="int" /> + <param index="2" name="timeout_max" type="int" /> <description> Sets the timeout parameters for a peer. The timeout parameters control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values are expressed in milliseconds. The [code]timeout_limit[/code] is a factor that, multiplied by a value based on the average round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached [code]timeout_min[/code]. The [code]timeout_max[/code] parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped. @@ -98,9 +98,9 @@ </method> <method name="throttle_configure"> <return type="void" /> - <argument index="0" name="interval" type="int" /> - <argument index="1" name="acceleration" type="int" /> - <argument index="2" name="deceleration" type="int" /> + <param index="0" name="interval" type="int" /> + <param index="1" name="acceleration" type="int" /> + <param index="2" name="deceleration" type="int" /> <description> Configures throttle parameter for a peer. Unreliable packets are dropped by ENet in response to the varying conditions of the Internet connection to the peer. The throttle represents a probability that an unreliable packet should not be dropped and thus sent by ENet to the peer. By measuring fluctuations in round trip times of reliable packets over the specified [code]interval[/code], ENet will either increase the probably by the amount specified in the [code]acceleration[/code] parameter, or decrease it by the amount specified in the [code]deceleration[/code] parameter (both are ratios to [constant PACKET_THROTTLE_SCALE]). |