How to get_packet() from peer.host?

Godot Version

4.3

Question

How to get_packet() from peer.host?

Im working on server browser for a game. Server browser will work like this: Player hosts game, create_server() → server sends packet with game info to master list service → player client open server browser and it refreshes → gets a list from masterlist → Joins game.

My plan was to use dpmaster (dark places) as masterlist, this uses simple protoccol. It only requires that you send packets from IP:PORT that the game is hosted on. While i can send the packets from host using peer.host.socket_send() but i need to receive reply from masterlist to make the connection and add host game data to the list. This ensures that the connection is possible and NAT is configured correctly, and game is joinable.

Is there a way to read a reply on peer.host from dpmaster or any other service that sends packet ?

nobody had this problem before?

I’m trying to create an ENet server to call put_packet and get_packet and communicate between clients.

Today is the fourth day of trial, no success so far.

I’m slowly going cray cray on this, @kuligs2 did you managed to make any get_packet between clients work?

Sorry for late reply, im not on these forums a lot, because of based people here. I get more answers on godotforums.

In any case, yes, in my case i just create 2x servers on host and clients. One is the game server using highlevel multiplayer api, and the other is udp server where i have control of the packets.

1 Like