I have a server with many IP addresses, and a UDP socket bound to 0.0.0.0 so I can receive UDP from any of them. How can I specify the source IP address to use in the UDP packets I am sending? My current implementation is using NIO so maybe using the DatagramChannel to perform the sending is the problem.
I gave up on a clean solution and just use a bound DatagramSocket per IP address on server that can be used to send UDP with the specific source IP for the outbound packets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With