NetworkedMultiplayerPeer

A high-level network interface to simplify multiplayer interactions.

Manages the connection to network peers. Assigns unique IDs to each client connected to the server.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

ConnectionStatus
enum ConnectionStatus
Constants
enum Constants
TransferMode
enum TransferMode

Functions

getConnectionStatus
NetworkedMultiplayerPeer.ConnectionStatus getConnectionStatus()

Returns the current state of the connection. See connectionstatus.

getPacketPeer
long getPacketPeer()

Returns the ID of the NetworkedMultiplayerPeer who sent the most recent packet.

getTransferMode
NetworkedMultiplayerPeer.TransferMode getTransferMode()
getUniqueId
long getUniqueId()

Returns the ID of this NetworkedMultiplayerPeer.

isRefusingNewConnections
bool isRefusingNewConnections()
opAssign
NetworkedMultiplayerPeer opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(NetworkedMultiplayerPeer other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
poll
void poll()

Waits up to 1 second to receive a new network event.

setRefuseNewConnections
void setRefuseNewConnections(bool enable)
setTargetPeer
void setTargetPeer(long id)

Sets the peer to which packets will be sent. The id can be one of: TARGET_PEER_BROADCAST to send to all connected peers, TARGET_PEER_SERVER to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. Default: TARGET_PEER_BROADCAST

setTransferMode
void setTransferMode(long mode)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

refuseNewConnections
bool refuseNewConnections [@property getter]
bool refuseNewConnections [@property setter]

If true this NetworkedMultiplayerPeer refuses new connections. Default value: false.

transferMode
NetworkedMultiplayerPeer.TransferMode transferMode [@property getter]
long transferMode [@property setter]

The manner in which to send packets to the target_peer. See transfermode.

Static functions

_new
NetworkedMultiplayerPeer _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta