createCall<Q, R> method

  1. @override
ClientCall<Q, R> createCall<Q, R>(
  1. ClientMethod<Q, R> method,
  2. Stream<Q> requests,
  3. CallOptions options
)
override

Initiates a new RPC on this connection.

Implementation

@override
ClientCall<Q, R> createCall<Q, R>(
    ClientMethod<Q, R> method, Stream<Q> requests, CallOptions options) {
  final call = ClientCall(
      method,
      requests,
      options,
      isTimelineLoggingEnabled
          ? TimelineTask(filterKey: clientTimelineFilterKey)
          : null);
  getConnection().then((connection) {
    if (call.isCancelled) return;
    connection.dispatchCall(call);
  }, onError: call.onConnectionError);
  return call;
}