Get connection info.
506119
def info(self):
        """"""
        backend_cls = self.backend_cls or "amqplib"
        port = self.port or self.create_backend().default_port
        return {"hostname": self.hostname,
                "userid": self.userid,
                "password": self.password,
                "virtual_host": self.virtual_host,
                "port": port,
                "insist": self.insist,
                "ssl": self.ssl,
                "transport_cls": backend_cls,
                "backend_cls": backend_cls,
                "connect_timeout": self.connect_timeout}
156870
def get_connection(self, name):
        
        name = quote(name, '')
        path = Client.urls['connections_by_name'] % name
        conn = self._call(path, 'GET')
        return conn
1156823
def get_connection(self, fail_silently=False):
        """"""
        from protean.services.email import get_connection

        if not self.connection:
            self.connection = get_connection(fail_silently=fail_silently)

        return self.connection
838417
def connections(self):
        """"""
        self._check_session()
        status, data = self._rest.get_request('connections')
        return data
1355303
def get_conn_info(self):
        from sockjs.cyclone.conn import ConnectionInfo

        
        return ConnectionInfo(self.request.remote_ip,
                              self.request.cookies,
                              self.request.arguments,
                              self.request.headers,
                              self.request.path)
884118
def getConnection(self, lfrom, lto):
        
        for connection in self.connections:
            if connection.fromLayer.name == lfrom and \
               connection.toLayer.name == lto:
                return connection
        raise NetworkError('Connection was not found.', (lfrom, lto))
1289110
def get_info(self):
        '''  '''
        return {
            'Connected': self.is_connected(),
            'Port': self.port,
            'Bytes Waiting': self.ser.in_waiting if self.ser else 0
        }
472866
def _get_connection():
    '''
    
    '''
    global COUCHBASE_CONN
    if COUCHBASE_CONN is None:
        opts = _get_options()
        if opts['password']:
            COUCHBASE_CONN = couchbase.Couchbase.connect(host=opts['host'],
                                                         port=opts['port'],
                                                         bucket=opts['bucket'],
                                                         password=opts['password'])
        else:
            COUCHBASE_CONN = couchbase.Couchbase.connect(host=opts['host'],
                                                         port=opts['port'],
                                                         bucket=opts['bucket'])

    return COUCHBASE_CONN
456707
def get(self) -> None:
        """"""
        from wdom.document import get_document
        logger.info('connected')
        self.write(get_document().build())
459902
def get_connection(self):
        "  "
        app = get_app()
        for connection, client_state in self._client_states.items():
            if client_state.app == app:
                return connection

        raise ValueError('Connection for app %r not found' % (app, ))
1345633
private Map<String, Object> getConnectionInfo() {
        String[] hostnames = (String[]) props.get(HOST_NAMES);
        int[] ports = (int[]) props.get(PORTS);

        String hostname = (hostnames == null || hostnames.length < 1) ? null : hostnames[0];
        String port = (ports == null || ports.length < 1) ? null : String.valueOf(ports[0]);

        return sslHelper.getConnectionInfo(hostname, port);
    }
301464
def get_connection(connection_details=None):
    

    if connection_details is None:
        connection_details = get_default_connection_details()

    return MySQLdb.connect(
        connection_details['host'],
        connection_details['user'],
        connection_details['password'],
        connection_details['database']
    )
787791
def on_connect(client):
    """"""
    client.nick(client.user.nick)
    client.userinfo(client.user.username, client.user.realname)
71965
def get_connection_cls(cls):
        
        if cls.__connection_cls is None:
            cls.__connection_cls, _ = cls.from_settings()
        return cls.__connection_cls
961776
def connection(self):
        """"""

        if self._connection:
            return self._connection

        self.log.debug('Initializing connection to %s' % (self.bosh_service.
                                                          netloc))
        if self.bosh_service.scheme == 'http':
            Connection = httplib.HTTPConnection
        elif self.bosh_service.scheme == 'https':
            Connection = httplib.HTTPSConnection
        else:
            # TODO: raise proper exception
            raise Exception('Invalid URL scheme %s' % self.bosh_service.scheme)

        self._connection = Connection(self.bosh_service.netloc, timeout=10)
        self.log.debug('Connection initialized')
        # TODO add exceptions handler there (URL not found etc)

        return self._connection
74874
def native_conn(self):
        """"""
        if self.__native is None:
            self.__native = self._get_connection()

        return self.__native
1173188
async def get(self):
        """"""
        try:
            return self._parse(await self.read_registers(0, 16))
        except TimeoutError:
            return {'ip': self.ip, 'connected': False}