🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

IPv6 Multicast not working

Started by
12 comments, last by hplus0603 6 years, 2 months ago

I haven't seen a computer station with a protocol that only uses IPV6,  sometime IPV4  only but the default windows setting is IPV6 and IPV4 enabled on most devices, Multicast using  IPV4 is the best option when announcing your game across local sub-net.

Just don't broadcast your created game 60 times a second : - D to not disrupt and flood other connected devices within the sub-net
and stop broadcasting if a certain condition is met E.g: if all players are connected, your last broadcast maybe saying the game is FULL or STARTED.

I broadcast my game every 256ms which 4 times a second and it is still seamless ^_^y

 

Advertisement
1 hour ago, DexterZ101 said:

Just don't broadcast your created game 60 times a second : - D to not disrupt and flood other connected devices within the sub-net

This is an area where mDNS shines. Rather than continuously broadcast from just the server, it broadcasts only changes in state (either a new service being advertised, or a new client connecting to the network). This allows building exponential backoff into all clients, which means that it's only chatty immediately after a state change, and quickly settles back down.

4 times a second seems very aggressive for a continuous broadcast.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Yeah, 4 times a second seems high :-)

Another option to reduce broadcast is for the client to broadcast a "solicit" that servers answer to, rather than the server blindly broadcasting. Clients can also look for other clients soliciting, if servers also answer using broadcast, and hold off on soliciting themselves if they've seen a request in the last (500 + random(0, 1000)) milliseconds. This can be effectively instant when the client joins, because it can send its first solicit right away, and usually, active servers will immediately answer.

mDNS is pretty good. If you want a drop-in solution that works, use that. Only go to your own broadcast if you find that you need faster response, or for some other reason need custom functionality.

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement