Put network-related code under #ifdef