Title: UDPClient broadcast Post by: ClementDoss on May 31, 2015, 10:10:42 PM Hi,
I'm having some troubles setting up a Multicast Client UDP using TRtcUdpClient. I managed to make the project work with TidUDPClient, but I must use a non-blocking solution for this project. For this sample, the client must request the server IP address. The rtc code is : Code: // Client side Setup The Indy code is Code: var It's the same rtcUDPServer for both example. The indy code triggers correctly the server side events. I'm unable to make rtcUDPClient do the same. ( I also tried using setting the serveraddress to '255.255.255.255'. Indy code works, rtc no joy.. ) What am I missing? Best regards, Clément Title: Re: UDPClient broadcast Post by: D.Tkalcec (RTC) on June 01, 2015, 12:21:02 AM Connect and Write methods when using UDP with RTC are asynchronous (message driven and require a message loop), which means that you can NOT simply call Connect, Write something, use a blocking Sleep and then Disconnect. Nothing will go out that way. You need to call Connect, wait for the OnConnect event and use Write from there. Calling Disconnect on the UDP connection with RTC will immediately stop the connection from working and clear connections sending and receiving buffers.
Check the UdpMessages Project in the Demos/RAW_UDP folder. Best Regards, Danijel Tkalcec Title: Re: UDPClient broadcast Post by: ClementDoss on June 01, 2015, 08:15:39 PM Hi Danijel,
I still thinking "blocking". That's the issue ;D After re-reading the Demos/RAW_UDP project, I managed to make my project works as I need. So much better! Thanks for answering with such details. Clément |