From 2832b55b2396f244bc074dd9ff756dd8e432affb Mon Sep 17 00:00:00 2001 From: qhdtlr <41363243+qhdtlr@users.noreply.github.com> Date: Wed, 8 Dec 2021 20:49:22 +0900 Subject: Document the MultiplayerPeerExtension class --- doc/classes/MultiplayerPeerExtension.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/classes/MultiplayerPeerExtension.xml b/doc/classes/MultiplayerPeerExtension.xml index c5fe04cb32..bd11c76039 100644 --- a/doc/classes/MultiplayerPeerExtension.xml +++ b/doc/classes/MultiplayerPeerExtension.xml @@ -1,8 +1,10 @@ + Class that can be inherited to implement custom multiplayer API networking layers via GDExtension. + This class is designed to be inherited from a GDExtension plugin to implement custom networking layers for the multiplayer API (such as WebRTC). All the methods below [b]must[/b] be implemented to have a working custom multiplayer implementation. See also [MultiplayerAPI]. @@ -10,16 +12,19 @@ + Called when the available packet count is internally requested by the [MultiplayerAPI]. + Called when the connection status is requested on the [MultiplayerPeer] (see [method MultiplayerPeer.get_connection_status]). + Called when the maximum allowed packet size (in bytes) is requested by the [MultiplayerAPI]. @@ -27,41 +32,49 @@ + Called when a packet needs to be received by the [MultiplayerAPI], with [code]p_buffer_size[/code] being the size of the binary [code]p_buffer[/code] in bytes. + Called when the ID of the [MultiplayerPeer] who sent the most recent packet is requested (see [method MultiplayerPeer.get_packet_peer]). + Called when the transfer channel to use is read on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_channel]). + Called when the transfer mode to use is read on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_mode]). + Called when the unique ID of this [MultiplayerPeer] is requested (see [method MultiplayerPeer.get_unique_id]). + Called when the "refuse new connections" status is requested on this [MultiplayerPeer] (see [member MultiplayerPeer.refuse_new_connections]). + Called when the "is server" status is requested on the [MultiplayerAPI]. See [method MultiplayerAPI.is_server]. + Called when the [MultiplayerAPI] is polled. See [method MultiplayerAPI.poll]. @@ -69,30 +82,35 @@ + Called when a packet needs to be sent by the [MultiplayerAPI], with [code]p_buffer_size[/code] being the size of the binary [code]p_buffer[/code] in bytes. + Called when the "refuse new connections" status is set on this [MultiplayerPeer] (see [member MultiplayerPeer.refuse_new_connections]). + Called when the target peer to use is set for this [MultiplayerPeer] (see [method MultiplayerPeer.set_target_peer]). + Called when the channel to use is set for this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_channel]). + Called when the transfer mode is set on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_mode]). -- cgit v1.2.3