phase3:Connection
178975
public static function Connection () {
		\ickx\fw2\router\Router::Connect('/{:controller}/{:action}/{:args}');
		\ickx\fw2\router\Router::Connect('/{:args}');
	}
436933
private void handleConnection(Address address, Connection connection, Throwable error, CompletableFuture<Connection> future) {
    if (open) {
      if (error == null) {
        setupConnection(address, connection, future);
      } else {
        LOGGER.debug("{} - Failed to connect! Reason: {}", id, error);
        connect(future);
      }
    }
  }
732155
def connection
      @connection ||= begin
        conn = Faraday.new(site, options[:connection_opts])
        conn.build do |b|
          options[:connection_build].call(b)
        end if options[:connection_build]
        conn
      end
    end
665484
function connect(element) {
    if (!TRIGGER_LIFE_CYCLE_METHODS) {
        return false;
    }
    let component = DOM.getNodeComponent(element);
    let children;
    if (component) {
        element = component;
        children = component.node.childNodes;
    } else {
        children = element.childNodes;
    }
    if (children) {
        [].forEach.call(children, connect);
    }
    if (element[DNA_SYMBOL] && !element.isConnected) {
        element[DOM.CONNECTED].call(element);
        return true;
    }
    return false;
}
232195
CompletableFuture<Void> connect(LocalConnection connection) {
    LocalConnection localConnection = new LocalConnection(listener.context, connections);
    connections.add(localConnection);
    connection.connect(localConnection);
    localConnection.connect(connection);
    return CompletableFuture.runAsync(() -> listener.listener.accept(localConnection), listener.context.executor());
  }
165056
function (callback) {
            debug('');

            self.repository.on('connect', function () {
              self.emit('connect');
            });

            self.repository.on('disconnect', function () {
              self.emit('disconnect');
            });

            self.repository.connect(callback);
          }
439312
private void addConnectFuture(ConnectFuture future) {
        Object key = connectFutures.add(future);
        future.getSession().setAttributeIfAbsent(CONNECT_FUTURE_KEY, key);
    }
1214662
function Connection (options) {
  options = utils.clone(options || {});

  var ns = this._ns = utils.createNamespace(options);
  var id = this.id = options.id || utils.uniqueId('connection');
  this._debug = utils.debug('connection:' + id);
  var me = this;

  // create controller connection
  this._host = options.host || define.host;
  this._port = options.port || define.port;
  process.nextTick(function () {
    me._debug('trying reconnect');
    me._reconnect();
  });

  me._queue = [];
  ['send', 'registerKey', 'deleteKey', 'deleteKeys', 'keys'].forEach(function (method) {
    me[method] = me._wrapMethod(me[method], method);
  });
  me.on('ready', function () {
    me._debug('emit listen');
    me.emit('listen');
    me._processQueue();
  });
}
587206
def connect(conn)
      start = Time.now
      conn.connect
      @latency = Time.now - start
      @down_at = nil
      true
    end
600880
def connect(self):
        
        self.client = client.KazooClient(hosts=",".join(self.hosts))

        self.client.add_listener(self.handle_connection_change)
        self.client.start_async()
589084
function handleConnection(self, options) {
	if (TRACE)	console.log('Connected to ' + options.host + ':' + options.port)
    	//self.socket = socket;
	self.emit("connect");
}
897420
private void updateConnectionDetails() {
        Stage stage = (Stage)platformLabel.getScene().getWindow();

        connectedLabel.setText(connected ? "YES" : "NO");
        remoteInfo.ifPresent(remote -> {
            remoteNameLabel.setText(remote.getName());
            versionLabel.setText(remote.getMajorVersion() + "." + remote.getMinorVersion());
            platformLabel.setText(remote.getPlatform().getDescription());
            stage.setTitle("Connected to " + remote.getName());
        });

        if (!connected) {
            stage.setTitle("Disconnected [" + remoteControl.getConnector().getConnectionName() + "]");
            menuLoadLabel.setText("NO");
            versionLabel.setText("");
            remoteNameLabel.setText("");
        }
    }
793492
async def on_connect(self, connection):
        ""
        # NOTE: for python3, we can't pass bytestrings as keyword arguments
        # so we need to decode channel/pattern names back to str strings
        # before passing them to [p]subscribe.
        if self.channels:
            channels = {}
            for k, v in iteritems(self.channels):
                if not self.decode_responses:
                    k = k.decode(self.encoding)
                channels[k] = v
            await self.subscribe(**channels)
        if self.patterns:
            patterns = {}
            for k, v in iteritems(self.patterns):
                if not self.decode_responses:
                    k = k.decode(self.encoding)
                patterns[k] = v
            await self.psubscribe(**patterns)
1294295
def connect(self):
        
        future = concurrent.Future()

        if self.connected:
            raise exceptions.ConnectError('already connected')

        LOGGER.debug('%s connecting', self.name)
        self.io_loop.add_future(
            self._client.connect(self.host, self.port),
            lambda f: self._on_connected(f, future))
        return future
1224021
private R connectOne(T first, R acc, T last) {
        synchronized (root) {
            Connector<T, R> l = left;
            if (l == null) {
                return pushRight(acc, last);
            }
            if (l.acc == NONE) {
                l.acc = acc;
                l.left = first;
                l.right = last;
                return connectEmpty();
            }
            T laright = l.right;
            if (mergeable.test(laright, first)) {
                l.acc = combiner.apply(l.acc, acc);
                l.right = last;
                return connectEmpty();
            }
            left = null;
            l.rhs = null;
            l.right = none();
            if (l.left != NONE) {
                return pushRight(acc, last);
            }
            acc = pushRight(acc, last);
            if (acc != NONE)
                left = new Connector<>(null, acc, this);
            return l.drain();
        }
    }
1131536
protected void postConnectProcessing(VirtualConnection inVC) {

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Finished connecting to target: " + this + " " + inVC);
        }
        getInterface(inVC);
    }
1188738
def _do_connect(self):
        """"""
        _, self._protocol = yield from self._loop.create_connection(
            lambda: SnapcastProtocol(self._callbacks), self._host, self._port)