Closed kfigiela closed 9 years ago
Did you check if this is available on windows too? Or does this break compilation for other platforms which are non-posix? ^^
No, I didn't, but https://msdn.microsoft.com/en-us/library/windows/desktop/ms740621(v=vs.85).aspx says that this is supported on Windows.
The SO_REUSEADDR works differently on each platform and I've wondered about the security implications of it... However looks like someone has written a very thorough explanation in http://stackoverflow.com/questions/14388706/socket-options-so-reuseaddr-and-so-reuseport-how-do-they-differ-do-they-mean-t and it also looks like one can already steal the socket on Windows. So maybe we don't have to care about that and could just apply SO_REUSEADDR...
This patch prevents "Error initialising socket 98" error when restarting shairplay.