Author Topic: UDP multicasting  (Read 2789 times)

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
UDP multicasting
« on: July 15, 2014, 07:29:13 AM »

Hello,


In release notes for 1.9.6, there is :"TNet will now use UDP multicasting instead of broadcasting by default."


According to the documentation in the code (in TNUdpProtocol, it's better to use multicasting).
Do you suggest using multicasting for LAN games?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UDP multicasting
« Reply #1 on: July 16, 2014, 12:08:10 AM »
Did you use broadcasting before? The change is completely seamless from your perspective. Broadcasting has issues when there are multiple network interfaces present. I saw no such issues with multicasting.

Note that this only affects you if you do any kind of UDP broadcasting -- server discovery via LAN, broadcasted RFCs, stuff like that.

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: UDP multicasting
« Reply #2 on: July 16, 2014, 01:53:33 PM »
Yes I was using broadcasting before, and UDP broadcasting, server discovery via LAN, broadcast RFC etc... lol
And activating multicasting make everything stopped working, so I deactivated it :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UDP multicasting
« Reply #3 on: July 17, 2014, 03:11:20 AM »
Made everything stop working? Did you update the server?

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: UDP multicasting
« Reply #4 on: July 17, 2014, 03:27:35 AM »
I don't have a server, it's a LAN game, so one of the player will start a UDP server from its own machine.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UDP multicasting
« Reply #5 on: July 17, 2014, 03:33:38 AM »
Ah, well assuming everyone is up to date, multicasting should work. Assuming it's supported by the router, of course. In my tests it worked better than broadcasting as it handled multiple NICs. But hey, I left a way to use broadcasting for a reason. Seems it was a good idea I did ;)

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: UDP multicasting
« Reply #6 on: July 17, 2014, 04:11:35 AM »
Ahah sure thing :)


I'll try to reactivate multicasting (much) later to see why it's not working and try to fix it.