Added ifdef on socket blocking