code: 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());
    }
docs: Connects to the server.