diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-09-08 01:50:22 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-09-24 21:23:43 +0200 |
commit | 2d810e8cd948f1e25e514986dc6f9a7cb7c52026 (patch) | |
tree | 5be52192e46882d8f35dc265a987f236e956abf5 /doc/classes | |
parent | ead6d10715b8e7344bc7457044c57598c324ef6a (diff) |
[Net/Docs] Update extensions documentation.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/MultiplayerPeer.xml | 4 | ||||
-rw-r--r-- | doc/classes/MultiplayerPeerExtension.xml | 99 | ||||
-rw-r--r-- | doc/classes/PacketPeerExtension.xml | 35 | ||||
-rw-r--r-- | doc/classes/StreamPeerExtension.xml | 48 |
4 files changed, 184 insertions, 2 deletions
diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml index 411317cdc8..6664f5aea6 100644 --- a/doc/classes/MultiplayerPeer.xml +++ b/doc/classes/MultiplayerPeer.xml @@ -52,14 +52,14 @@ </method> </methods> <members> - <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="true"> + <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="false"> If [code]true[/code], this [MultiplayerPeer] refuses new connections. </member> <member name="transfer_channel" type="int" setter="set_transfer_channel" getter="get_transfer_channel" default="0"> The channel to use to send packets. Many network APIs such as ENet and WebRTC allow the creation of multiple independent channels which behaves, in a way, like separate connections. This means that reliable data will only block delivery of other packets on that channel, and ordering will only be in respect to the channel the packet is being sent on. Using different channels to send [b]different and independent[/b] state updates is a common way to optimize network usage and decrease latency in fast-paced games. [b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly. </member> - <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="TransferMode" default="0"> + <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="TransferMode" default="2"> The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode]. </member> </members> diff --git a/doc/classes/MultiplayerPeerExtension.xml b/doc/classes/MultiplayerPeerExtension.xml new file mode 100644 index 0000000000..d9c173a4a1 --- /dev/null +++ b/doc/classes/MultiplayerPeerExtension.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MultiplayerPeerExtension" inherits="MultiplayerPeer" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="_get_available_packet_count" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_connection_status" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_max_packet_size" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_packet" qualifiers="virtual"> + <return type="int" /> + <argument index="0" name="r_buffer" type="const void*" /> + <argument index="1" name="r_buffer_size" type="int32_t*" /> + <description> + </description> + </method> + <method name="_get_packet_peer" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_transfer_channel" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_transfer_mode" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_unique_id" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_is_refusing_new_connections" qualifiers="virtual const"> + <return type="bool" /> + <description> + </description> + </method> + <method name="_is_server" qualifiers="virtual const"> + <return type="bool" /> + <description> + </description> + </method> + <method name="_poll" qualifiers="virtual"> + <return type="int" /> + <description> + </description> + </method> + <method name="_put_packet" qualifiers="virtual"> + <return type="int" /> + <argument index="0" name="p_buffer" type="const void*" /> + <argument index="1" name="p_buffer_size" type="int" /> + <description> + </description> + </method> + <method name="_set_refuse_new_connections" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="p_enable" type="bool" /> + <description> + </description> + </method> + <method name="_set_target_peer" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="p_peer" type="int" /> + <description> + </description> + </method> + <method name="_set_transfer_channel" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="p_channel" type="int" /> + <description> + </description> + </method> + <method name="_set_transfer_mode" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="p_mode" type="int" /> + <description> + </description> + </method> + </methods> +</class> diff --git a/doc/classes/PacketPeerExtension.xml b/doc/classes/PacketPeerExtension.xml new file mode 100644 index 0000000000..6804053484 --- /dev/null +++ b/doc/classes/PacketPeerExtension.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PacketPeerExtension" inherits="PacketPeer" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="_get_available_packet_count" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_max_packet_size" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_packet" qualifiers="virtual"> + <return type="int" /> + <argument index="0" name="r_buffer" type="const void*" /> + <argument index="1" name="r_buffer_size" type="int32_t*" /> + <description> + </description> + </method> + <method name="_put_packet" qualifiers="virtual"> + <return type="int" /> + <argument index="0" name="p_buffer" type="const void*" /> + <argument index="1" name="p_buffer_size" type="int" /> + <description> + </description> + </method> + </methods> +</class> diff --git a/doc/classes/StreamPeerExtension.xml b/doc/classes/StreamPeerExtension.xml new file mode 100644 index 0000000000..93fda8cf5d --- /dev/null +++ b/doc/classes/StreamPeerExtension.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="StreamPeerExtension" inherits="StreamPeer" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="_get_available_bytes" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_data" qualifiers="virtual"> + <return type="int" /> + <argument index="0" name="r_buffer" type="uint8_t*" /> + <argument index="1" name="r_bytes" type="int" /> + <argument index="2" name="r_received" type="int32_t*" /> + <description> + </description> + </method> + <method name="_get_partial_data" qualifiers="virtual"> + <return type="int" /> + <argument index="0" name="r_buffer" type="uint8_t*" /> + <argument index="1" name="r_bytes" type="int" /> + <argument index="2" name="r_received" type="int32_t*" /> + <description> + </description> + </method> + <method name="_put_data" qualifiers="virtual"> + <return type="int" /> + <argument index="0" name="p_data" type="const void*" /> + <argument index="1" name="p_bytes" type="int" /> + <argument index="2" name="r_sent" type="int32_t*" /> + <description> + </description> + </method> + <method name="_put_partial_data" qualifiers="virtual"> + <return type="int" /> + <argument index="0" name="p_data" type="const void*" /> + <argument index="1" name="p_bytes" type="int" /> + <argument index="2" name="r_sent" type="int32_t*" /> + <description> + </description> + </method> + </methods> +</class> |