Function WebRTCMultiplayer.initialize
Initialize the multiplayer peer with the given peer_id
(must be between 1 and 2147483647).
If server_compatibilty
is false
(default), the multiplayer peer will be immediately in state constant NetworkedMultiplayerPeer
and NetworkedMultiplayerPeer
will not be emitted.
If server_compatibilty
is true
the peer will suppress all NetworkedMultiplayerPeer
signals until a peer with id constant NetworkedMultiplayerPeer
connects and then emit NetworkedMultiplayerPeer
. After that the signal NetworkedMultiplayerPeer
will be emitted for every already connected peer, and any new peer that might connect. If the server peer disconnects after that, signal NetworkedMultiplayerPeer
will be emitted and state will become constant NetworkedMultiplayerPeer
.
godot .core .defs .GodotError initialize
(
const(long) peer_id,
const(bool) server_compatibility = false
) nothrow @nogc;