Remove socket.h dependency.