RTC Forums

Subscription => Support => Topic started by: paulo goncalves on January 22, 2015, 09:51:03 PM



Title: BroadCast UDP in localhost
Post by: paulo goncalves on January 22, 2015, 09:51:03 PM
Hi.
Is there a way to use the TRtcUdpServer / TRtcUdpClient to broadcast only on localhost?
Must notify several events of different ranks at the same time and I think the UDP can help me in this case.

Thanks.


Title: Re: BroadCast UDP in localhost
Post by: D.Tkalcec (RTC) on January 22, 2015, 10:29:26 PM
UdpMultiCastMaxHops property on the UDP Client component should define how many "hops" is a multicast UDP packet allowed to make before it has to stop. This value is usually reffered to as "TTL" in documentation about UDP broadcasting. Using a value of 0 would limit broadcasting to the local machine, while a value of 1 means the 1st router, and so on.

You will also need to specify a Port number and set the broadcasting Address in the ServerAddr property for the UDP Client component. For example, 255.255.255.255 is for the whole network and 127.255.255.255 is for the local machine only.

On the UDP Server component, you will need to specify the same Port as on the Client and set the UdpReuseAddr property to TRUE if more than one Application using the UDP Server component is expected to run on the same PC (which I expect is the case, or you would not be asking about broadcasting to localhost).

Best Regards,
Danijel Tkalcec


Title: Re: BroadCast UDP in localhost
Post by: paulo goncalves on January 23, 2015, 12:14:02 PM
Thanks.