createCall<Q, R> method

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

Initiates a new RPC on this connection.

Implementation

@override
ClientCall<Q, R> createCall<Q, R>(
    ClientMethod<Q, R> method, Stream<Q> requests, CallOptions options) {
  _callEvents.add(method.path);
  final call = ClientCall(method, requests, options);
  getConnection().then((connection) {
    if (call.isCancelled) return;
    connection.dispatchCall(call);
  }, onError: call.onConnectionError);
  return call;
}