PacketPeerUDP

UDP packet peer.

Can be used to send raw UDP packets as well as Variants.

Members

Aliases

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

Functions

close
void close()

Close the UDP socket the PacketPeerUDP is currently listening on.

getPacketIp
String getPacketIp()

Return the IP of the remote peer that sent the last packet(that was received with PacketPeer.getPacket or PacketPeer.getVar).

getPacketPort
long getPacketPort()

Return the port of the remote peer that sent the last packet(that was received with PacketPeer.getPacket or PacketPeer.getVar).

isListening
bool isListening()

Return whether this PacketPeerUDP is listening.

listen
GodotError listen(long port, StringArg1 bind_address, long recv_buf_size)

Make this PacketPeerUDP listen on the "port" binding to "bind_address" with a buffer size "recv_buf_size". If "bind_address" is set as "*" (default), the peer will listen on all available addresses (both IPv4 and IPv6). If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the peer will listen on all available addresses matching that IP type. If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists).

opAssign
PacketPeerUDP opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(PacketPeerUDP 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.
setDestAddress
GodotError setDestAddress(StringArg0 host, long port)

Set the destination address and port for sending packets and variables, a hostname will be resolved using if valid.

wait
GodotError wait()

Wait for a packet to arrive on the listening port, see listen.

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Static functions

_new
PacketPeerUDP _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