Im having troubles, cant seem to find it in docs. I need to know what IP and PORT client is connected to.
Started with this: https://docs.godotengine.org/en/stable/tutorials/networking/high_level_multiplayer.html
# Create client.
var peer = ENetMultiplayerPeer.new()
peer.create_client(IP_ADDRESS, PORT)
multiplayer.multiplayer_peer = peer
# Create server.
var peer = ENetMultiplayerPeer.new()
peer.create_server(PORT, MAX_CLIENTS)
multiplayer.multiplayer_peer = peer
Ok so here you can see, when you create host or client, you specify the IP and PORT.
But it seems to me that you have to keep track of what IP and PORT client was connected to. There is no way to probe "peer" when it is client to get the "HOST" ip and port that this peer is connected to.
Is this the case or am i missing something?
Why would i need this information later after client has joined the game? For server browser, so that it shows player/user which server you is currently joined to.
I thought i could probe the "peer" object to get the IP and port, but according to docs it doesnt have these properties.
https://docs.godotengine.org/en/stable/classes/class_multiplayerpeer.html#class-multiplayerpeer