socket: conditionally use