use socklen_t consistently