August 11, 2018 How the Heck Do I Subscribe to Receiving Multicast Messages Broadcast to Organization's IP ?? | ||||
---|---|---|---|---|
| ||||
Hello All! I've been trying every possible combination and cannot get anything working. (>_<) This is I think the closest I've got, I think the problem may be with the 3 argument. I'm not sure how to join the Multicast IP membership? (this code currently does not work - throws error: 'Unable to set socket option: An invalid argument was supplied'.) Socket listen_socket = new Socket(AddressFamily.INET, SocketType.DGRAM, ProtocolType.UDP); listen_socket.setOption(SocketOptionLevel.IGMP, SocketOption.IPV6_JOIN_GROUP, 1); auto adr = getAddress("0.0.0.0", "56000"); listen_socket.bind(adr[0]); This is how the messages are sent (which works fine): Socket udp_broadcast_soc = new UdpSocket(); udp_broadcast_soc.setOption(SocketOptionLevel.SOCKET, SocketOption.BROADCAST, 1); auto adr = getAddress("239.192.0.10", 54000); udp_broadcast_soc.sendTo(<message>, adr[0]); Please Please Please Help, I am desperate! Many Thanks in Advance for your time & attention, -joe |
Copyright © 1999-2021 by the D Language Foundation