Hello, I’m trying to get broadcast discovery working in my game using the LLAPI and have run into a bit of a snag which I think only really impacts testing as far as I can tell.
As soon as the player launches my game, I want broadcast discovery to start so that I can show them a little icon on the homepage if there’s a game in progress on their local network. So in order to do that, as soon as the player launches my game I need to enable broadcast discovery.
The issue I’m running into is that I need to open a socket to the broadcast port, but when testing locally I have multiple instances of the app open on the same computer so the first one to connect gets the socket on my broadcast port, and any subsequent clients I launch all fail to initialize their sockets as it’s already in use.
The next thing I tried was to attempt to broadcast to a range of ports (there’s only a max of 4 players) so I put NetworkTransport.StartBroadcastDiscovery into a loop on my server, but it would seem that broadcastDiscovery can only be enabled for a single port at a time.
I do not have another computer that I can test this with currently, but I imagine that the issue would go away when running clients on different devices. My question is, is there a way around this little issue, or am I going to have to ensure I’m always testing on different devices?