osx does not have nonblock flag on sockets, do not use in tests