dannagle / PacketSender

Network utility for sending / receiving TCP, UDP, SSL, HTTP
https://packetsender.com
GNU General Public License v2.0
2.35k stars 367 forks source link

Allow the user to enable SO_REUSEADDR and disable SO_EXCLUSIVEADDRUSE for the UDP Server #223

Open alkadi opened 3 years ago

alkadi commented 3 years ago

What OS?

Description of issue

PacketSender currently takes exclusive access of the port on which it opens the UDP server, this prevents others apps on the same machine from receiving UDP packets on the same port. This can be easily fixed on Windows by including the flag SO_REUSEADDR and disabling the flag SO_EXCLUSIVEADDRUSE when creating the socket connection. On Linux / OSX SO_REUSEPORT would need to be handled as well. Please review this Stack Overflow answer for more information: https://stackoverflow.com/a/14388707