make Socket::close() method private