- getAvailablePacketCount
long getAvailablePacketCount()
Return the number of packets currently available in the ring-buffer.
- getPacket
PoolByteArray getPacket()
- getPacketError
GodotError getPacketError()
Return the error state of the last packet received (via getPacket and getVar).
- getVar
Variant getVar()
- isObjectDecodingAllowed
bool isObjectDecodingAllowed()
- opAssign
PacketPeer opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
- opEquals
bool opEquals(PacketPeer 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.
- putPacket
GodotError putPacket(PoolByteArray buffer)
- putVar
GodotError putVar(VariantArg0 var)
Send a Variant as a packet.
- setAllowObjectDecoding
void setAllowObjectDecoding(bool enable)
Abstraction and base class for packet-based protocols.
PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low level bytes or having to worry about network ordering.