NetworkedMultiplayerENetCreateServer Method |
Create server that listens to connections via port. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use SetBindIp(String). The default IP is the wildcard "*", which listens on all available interfaces. max_clients is the maximum number of clients that are allowed at once, any number up to 4095 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see CreateClient(String, Int32, Int32, Int32, Int32). Returns if a server was created, if this NetworkedMultiplayerENet instance already has an open connection (in which case you need to call CloseConnection(UInt32) first) or if the server could not be created.
Namespace: Godot
public Error CreateServer( int port, int maxClients = 32, int inBandwidth = 0, int outBandwidth = 0 )
[Missing <param name="port"/> documentation for "M:Godot.NetworkedMultiplayerENet.CreateServer(System.Int32,System.Int32,System.Int32,System.Int32)"]
[Missing <param name="maxClients"/> documentation for "M:Godot.NetworkedMultiplayerENet.CreateServer(System.Int32,System.Int32,System.Int32,System.Int32)"]
[Missing <param name="inBandwidth"/> documentation for "M:Godot.NetworkedMultiplayerENet.CreateServer(System.Int32,System.Int32,System.Int32,System.Int32)"]
[Missing <param name="outBandwidth"/> documentation for "M:Godot.NetworkedMultiplayerENet.CreateServer(System.Int32,System.Int32,System.Int32,System.Int32)"]
[Missing <returns> documentation for "M:Godot.NetworkedMultiplayerENet.CreateServer(System.Int32,System.Int32,System.Int32,System.Int32)"]