I'm trying to receive UDP packets which are sent to a multicast group. I can see the packets being received in WireShark (dest ip = 225.255.255.255 dest port = 1120), and can receive the data using an example python script I found on the net, meaning that UDP multicast group and port are correct.
I'm creating an UDP server like this:
var UDPServer: TWSocketServer;
begin
UDPServer := TWSocketServer.Create(Self);
UDPServer.Proto := 'udp';
UDPServer.Addr := '0.0.0.0';
UDPServer.Port := '1120';
UDPServer.MultiCast := true;
UDPServer.ReuseAddr := true;
UDPServer.MultiCastAddrStr := '225.255.255.255';
UDPServer.OnDataAvailable := OnUDPDataAvailable;
UDPServer.Listen();
end;
The OnUDPDataAvailable is never called, am I missing something here in setting the server up properly to listen for this group?