NetworkedMultiplayerENet Properties |
The NetworkedMultiplayerENet type exposes the following members.
Name | Description | |
---|---|---|
AllowObjectDecoding | Deprecated. Use get_var and put_var parameters instead. If true, the PacketPeer will allow encoding and decoding of object via GetVar(Boolean) and PutVar(Object, Boolean). Warning: Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. | |
AlwaysOrdered | Enforce ordered packets when using (thus behaving similarly to ). This is the only way to use ordering with the RPC system. | |
ChannelCount | The number of channels to be used by ENet. Channels are used to separate different kinds of data. In reliable or ordered mode, for example, the packet delivery order is ensured on a per-channel basis. This is done to combat latency and reduces ordering restrictions on packets. The delivery status of a packet in one channel won't stall the delivery of other packets in another channel. | |
CompressionMode | The compression method used for network packets. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all. | |
DtlsVerify | Enable or disable certificate verification when UseDtlstrue. | |
DynamicObject |
Gets a new DynamicGodotObject associated with this instance.
(Inherited from Object.) | |
EncodeBufferMaxSize | Maximum buffer size allowed when encoding Variants. Raise this value to support heavier memory allocations. The PutVar(Object, Boolean) method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the Variant. If the Variant is bigger than encode_buffer_max_size, the method will error out with . | |
NativeInstance | (Inherited from Object.) | |
RefuseNewConnections | If true, this NetworkedMultiplayerPeer refuses new connections. | |
ServerRelay | Enable or disable the server feature that notifies clients of other peers' connection/disconnection, and relays messages between them. When this option is false, clients won't be automatically notified of other peers and won't be able to send them packets through the server. | |
TransferChannel | Set the default channel to be used to transfer data. By default, this value is -1 which means that ENet will only use 2 channels: one for reliable packets, and one for unreliable packets. The channel 0 is reserved and cannot be used. Setting this member to any value between 0 and ChannelCount (excluded) will force ENet to use that channel for sending data. See ChannelCount for more information about ENet channels. | |
TransferMode | The manner in which to send packets to the target_peer. See NetworkedMultiplayerPeerTransferModeEnum. | |
UseDtls | When enabled, the client or server created by this peer, will use PacketPeerDTLS instead of raw UDP sockets for communicating with the remote peer. This will make the communication encrypted with DTLS at the cost of higher resource usage and potentially larger packet size. Note: When creating a DTLS server, make sure you setup the key/certificate pair via SetDtlsKey(CryptoKey) and SetDtlsCertificate(X509Certificate). For DTLS clients, have a look at the DtlsVerify option, and configure the certificate accordingly via SetDtlsCertificate(X509Certificate). |