Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UDP Broadcast across VLANs
#4
(12-05-2024, 05:51 PM)Ahmed Sayed Wrote: I noticed now that there is a TIdIPMCastServer/Client components, I never used them before how can I use them to fit my needs?

I'm not overly familiar with multicast, either. But I think it would go like this...

You would have your app use TIdIPMCastClient to subscribe to a multicast group and listen for incoming packets on a given port.

Then, when you want to discover other running instances, you can use TIdIPMCastServer to send your query packet to the multicast group IP on that port. Each TIdIPMCastClient.OnIPMCastRead handler can then send a reply back to the sender IP/Port as you were probably doing before.

The catch is that TIdIPMCastServer and TIdMCastClient are primarily designed for a producer/consumer model, respectively. As such, TIdIPMCastServer does not have any reading methods of its own (but its Binding does), so I'm not sure if you can easily receive all of the replies with TIdIPMCastServer. You might need to use TIdUDPServer instead. You should be able to send out your query packet to the multicast group IP using either TIdUDPServer or TIdIPMCastServer. At least TIdUDPServer has an OnUDPRead event.

Reply


Messages In This Thread
UDP Broadcast across VLANs - by Ahmed Sayed - 12-05-2024, 09:21 AM
RE: UDP Broadcast across VLANs - by rlebeau - 12-05-2024, 04:58 PM
RE: UDP Broadcast across VLANs - by Ahmed Sayed - 12-05-2024, 05:51 PM
RE: UDP Broadcast across VLANs - by rlebeau - 12-05-2024, 08:06 PM
RE: UDP Broadcast across VLANs - by Ahmed Sayed - 12-06-2024, 08:43 AM
RE: UDP Broadcast across VLANs - by rlebeau - 12-06-2024, 04:15 PM
RE: UDP Broadcast across VLANs - by Ahmed Sayed - 12-07-2024, 02:56 AM
RE: UDP Broadcast across VLANs - by rlebeau - 12-07-2024, 06:26 AM
RE: UDP Broadcast across VLANs - by Ahmed Sayed - 12-07-2024, 11:42 AM
RE: UDP Broadcast across VLANs - by rlebeau - 12-07-2024, 09:08 PM
RE: UDP Broadcast across VLANs - by Ahmed Sayed - 12-09-2024, 12:43 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)