Click or drag to resize

WebRTCMultiplayerAddPeer Method

Add a new peer to the mesh with the given peer_id. The WebRTCPeerConnection must be in state .

Three channels will be created for reliable, unreliable, and ordered transport. The value of unreliable_lifetime will be passed to the maxPacketLifetime option when creating unreliable and ordered channels (see CreateDataChannel(String, Dictionary)).

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public Error AddPeer(
	WebRTCPeerConnection peer,
	int peerId,
	int unreliableLifetime = 1
)

Parameters

peer
Type: GodotWebRTCPeerConnection

[Missing <param name="peer"/> documentation for "M:Godot.WebRTCMultiplayer.AddPeer(Godot.WebRTCPeerConnection,System.Int32,System.Int32)"]

peerId
Type: SystemInt32

[Missing <param name="peerId"/> documentation for "M:Godot.WebRTCMultiplayer.AddPeer(Godot.WebRTCPeerConnection,System.Int32,System.Int32)"]

unreliableLifetime (Optional)
Type: SystemInt32

[Missing <param name="unreliableLifetime"/> documentation for "M:Godot.WebRTCMultiplayer.AddPeer(Godot.WebRTCPeerConnection,System.Int32,System.Int32)"]

Return Value

Type: Error

[Missing <returns> documentation for "M:Godot.WebRTCMultiplayer.AddPeer(Godot.WebRTCPeerConnection,System.Int32,System.Int32)"]

See Also