In my application, I have a DatagramSocket
. I want to set the socket so that it will receive DatagramPackets
from any IP-Address, and not have to specify one. Would this be possible at all?
I have a list of EndPoints
I want to send data to at some point, and expect the messages sent to me to come from these addresses, but I don't want to iterate through this list and individually receive packets.
Is there any way I can achieve this? I've done some extensive searches, but I can't seem to find a suitable answer...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.