Author Topic: tno.Send VS tno.BroadcastToLAN  (Read 1939 times)

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
tno.Send VS tno.BroadcastToLAN
« on: May 26, 2014, 10:42:24 AM »
Hello,

Can you tell me what's the difference between these two?

Thx.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: tno.Send VS tno.BroadcastToLAN
« Reply #1 on: May 27, 2014, 12:11:10 AM »
tno.Send goes to the channel or target player.

tno.BroadcastToLAN goes via UDP to everyone who's listening to the specified port, whether they are connected or not. Think server discovery.

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: tno.Send VS tno.BroadcastToLAN
« Reply #2 on: May 27, 2014, 12:18:40 AM »
OK so :
- tno.SendBroadcast for server discovery.
- tno.Send(Target.Broadcast) for RFC call when not on same channel
- tno.Send(Target.X) otherwise

Right?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: tno.Send VS tno.BroadcastToLAN
« Reply #3 on: May 28, 2014, 07:54:43 AM »
Yup. Target.Broadcast is for things like server-wide chat.