bindSocket() ignores address


I noticed that calls to DatagramSocket::bindToPort(port, addr) always succeed even if I supply a bogus address. On investigation, I notice that this function calls bindSocket().

bindSocket() has some conditional compilation in it which means that for anything other than Windows, it ignores the supplied address and always binds to "any", which is not very helpful.

I can patch the code to make it work correctly, but my question is why this behaviour? Any ideas anyone?