clientStreamCall method

Future<void> clientStreamCall(
  1. String path,
  2. List<Marshaler> reqs,
  3. Unmarshaler resp, {
  4. Map<String, String>? metadata,
  5. Duration? timeout,
})

Send all requests, then decode the one response into resp.

Implementation

Future<void> clientStreamCall(String path, List<Marshaler> reqs,
    Unmarshaler resp,
    {Map<String, String>? metadata, Duration? timeout}) async {
  final stream = await _open(path, metadata, timeout: timeout);
  try {
    _sendAll(stream, reqs);
    await _collectOne(stream, resp, 'client-streaming call');
  } finally {
    endpoint.closeStream(stream.streamId);
  }
}