NetworkedMultiplayerENet.createClient

Create client that connects to a server at address using specified port. The given address needs to be either a fully qualified domain name (e.g. "www.example.com") or an IP address in IPv4 or IPv6 format (e.g. "192.168.1.1"). The port is the port the server is listening on. The in_bandwidth and out_bandwidth parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns constant OK if a client was created, constant ERR_ALREADY_IN_USE if this NetworkedMultiplayerENet instance already has an open connection (in which case you need to call closeConnection first) or constant ERR_CANT_CREATE if the client could not be created. If client_port is specified, the client will also listen to the given port; this is useful for some NAT traversal techniques.

struct NetworkedMultiplayerENet
@nogc nothrow
GodotError
createClient
(
in String address
,
in long port
,
in long in_bandwidth = 0
,
in long out_bandwidth = 0
,
in long client_port = 0
)

Meta