PacketPeer implementation using the ENet library.
    public class NetworkedMultiplayerENet : NetworkedMultiplayerPeer

A connection (or a listening server) that should be passed to SceneTree.NetworkPeer.set. Socket events can be handled by connecting to SceneTree signals.

Inheritance Chain


    public NetworkedMultiplayerENet()


    public CompressionModeEnum CompressionMode { get; set; }


    public void CloseConnection()

    public Error CreateClient(string ip, int port, int inBandwidth = 0, int outBandwidth = 0)

Create client that connects to a server at address ip using specified port.

    public Error CreateServer(int port, int maxClients = 32, int inBandwidth = 0, int outBandwidth = 0)

Create server that listens to connections via port.

    public CompressionModeEnum GetCompressionMode()

Getter for CompressionMode

    public void SetBindIp(string ip)

    public void SetCompressionMode(CompressionModeEnum mode)

Setter for CompressionMode

Inner Types


Name Value Description
None 0  
RangeCoder 1  
Fastlz 2  
Zlib 3  
Zstd 4