NetworkedMultiplayerENet

Inherits: NetworkedMultiplayerPeer < PacketPeer < Reference < Object

Category: Core

Brief Description

PacketPeer implementation using the ENet library.

Member Functions

void close_connection ( )
int create_client ( String ip, int port, int in_bandwidth=null, int out_bandwidth=null )
int create_server ( int port, int max_clients=0, int in_bandwidth=32, int out_bandwidth=null )
int get_compression_mode ( ) const
void set_bind_ip ( String ip )
void set_compression_mode ( int mode )

Numeric Constants

  • COMPRESS_NONE = 0
  • COMPRESS_RANGE_CODER = 1
  • COMPRESS_FASTLZ = 2
  • COMPRESS_ZLIB = 3
  • COMPRESS_ZSTD = 4

Description

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

Member Function Description

  • void close_connection ( )
  • int create_client ( String ip, int port, int in_bandwidth=null, int out_bandwidth=null )
  • int create_server ( int port, int max_clients=0, int in_bandwidth=32, int out_bandwidth=null )
  • int get_compression_mode ( ) const
  • void set_bind_ip ( String ip )
  • void set_compression_mode ( int mode )