I am trying to implement a Multicast group in Java whose members can both send and receive DatagramPackets
by using MulticastSockets
. The sender relies on acknowledgements from the receiving members in order to ensure, say, that all members have received the transmitted file.
My question is whether it is possible for a receiving member to determine the sender of the packet, as all members send and receive packets through the Multicast address they have joined.
This should be possible by assigning each member an ID which will be included (as a sort of preamble) in the first packet of a transmission, but I was wondering whether there is a better solution.
Is any information which could be used to determine the sender stored in the DatagramPacket
sent?