tailhook/libwebsite — pull request #7 by nathan-cormier (2013-03-27 18:22:22+00:00)
Title: Allow binding a specified incoming address on Mac OSX.

On OSX sockaddr_in needs to have sin_len set and sin_zero should be zeroed out, otherwise we cannot bind specific incoming addresses (only INADDR_ANY would work).

Note: the #ifdef __APPLE__ might not be needed, I expect that setting sin_len and sin_zero should work fine on Linux (although is not required), but I haven't tested it.