$createStreamingCall<Q, R> method

ResponseStream<R> $createStreamingCall<Q, R>(
  1. ClientMethod<Q, R> method,
  2. Stream<Q> requests, {
  3. CallOptions? options,
})

Implementation

ResponseStream<R> $createStreamingCall<Q, R>(
    ClientMethod<Q, R> method, Stream<Q> requests,
    {CallOptions? options}) {
  var invoker = (method, requests, options) =>
      ResponseStream<R>(_channel.createCall<Q, R>(method, requests, options));

  for (final interceptor in _interceptors.reversed) {
    final delegate = invoker;
    invoker = (method, requests, options) => interceptor
        .interceptStreaming<Q, R>(method, requests, options, delegate);
  }

  return invoker(method, requests, _options.mergedWith(options));
}