tailhook / libwebsite

An HTTP and websocket protocol implementation for libev event loop (UNMAINTAINED, use rust and tk-http crate)
MIT License
39 stars 14 forks source link

Allow binding a specified incoming address on Mac OSX. #7

Closed nathan-cormier closed 11 years ago

nathan-cormier commented 11 years ago

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.

tailhook commented 11 years ago

Merged. Thanks!