[Multiplayer] [Websocket] Signal "connection_established" not working

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Foreman21

Hi Everybody!

I trying to do a multiplayer game using websocket.

The signal “connection_established” seems not working.

peer.connect("connection_established", self, "_connected")

Here is the code to initialize the websocket connection (client):

func init_connection():
get_tree().connect("network_peer_disconnected", self, "_peer_disconnected")
get_tree().connect("network_peer_connected", self, "_peer_connected")
peer = WebSocketClient.new()
peer.connect("connection_failed", self, "_close_network")
peer.connect("connection_established", self, "_connected")
peer.connect_to_url("ws://" + IPServer + ":" + str(DEF_PORT), PoolStringArray([PROTO_NAME]), true)
get_tree().set_network_peer(peer)

What I understood is that connect(“connection_established”, self, “_connected”) must be connected to get_tree() but I get this error when I trying:

connect: In Object of type 'SceneTree': Attempt to connect nonexistent signal 'connection_established' to method 'Node._connected'.

function _peer_connected works but _connected is never call.

Is somebody have an idea?

Regards, Foreman21.