network.create_server(port, max_players)
set_custom_multiplayer(gateway_api)
custom_multiplayer.set_root_node(self)
custom_multiplayer.set_network_peer(network)
print("Gateway server started")
network.connect("peer_connected", self, "on_peer_connect")
network.connect("peer_disconnected", self, "on_peer_disconnect")
Above is the code on the server,
network = NetworkedMultiplayerENet.new()
gateway_api = MultiplayerAPI.new()
username = _username
password = _password
network.create_client(ip, port)
set_custom_multiplayer(gateway_api)
custom_multiplayer.set_root_node(self)
custom_multiplayer.set_network_peer(network)
network.connect("connection_succeeded", self, "on_connection_success")
network.connect("connection_failed", self, "on_connection_fail")
And this is the code on the client.
When I run the code on the client I get no errors, but I never receive the connection failed or connection succeeded signals. I also have the server run custom_multiplayer.poll() in _process().
Does anyone know the reason for this?