streamPollAndFetch method

Future<StreamPollFetchResponse> streamPollAndFetch(
  1. int streamId, {
  2. int? bufferSize,
})
inherited

Polls async stream status and, when ready, fetches the next chunk in one isolate round-trip. Prefer this over separate streamPollAsync + streamFetch in hot async multi-result loops.

Implementation

Future<StreamPollFetchResponse> streamPollAndFetch(
  int streamId, {
  int? bufferSize,
}) {
  return _sendRequest<StreamPollFetchResponse>(
    StreamPollFetchRequest(
      _nextRequestId(),
      streamId,
      bufferSize: bufferSize,
    ),
  );
}