Skip to main content

GrpcFilteredCheckpointStream

Namespace: IotaSdk

A stream of filtered checkpoints returned by [GrpcClient::checkpoints_stream_filtered].

Call next in a loop to receive items; it returns None once the stream is exhausted or cancel has been called.

public class GrpcFilteredCheckpointStream : IGrpcFilteredCheckpointStream, System.IDisposable

Inheritance Object → GrpcFilteredCheckpointStream
Implements IGrpcFilteredCheckpointStream, IDisposable

Constructors​

GrpcFilteredCheckpointStream(UInt64)​

public GrpcFilteredCheckpointStream(ulong pointer)

Parameters​

pointer UInt64

Methods​

Destroy()​

public void Destroy()

Dispose()​

public void Dispose()

Cancel()​

Cancel the stream, dropping the connection and unblocking a pending next.

Idempotent, and safe to call while next is pending — the pending call drops the connection on its way out.

Named cancel rather than close because a close method collides with the disposal method uniffi generates for objects in some languages.

public void Cancel()

IsCanceled()​

Whether the stream has been canceled.

public bool IsCanceled()

Returns​

Boolean

Next()​

Get the next item from the stream.

Returns None once the stream is exhausted or has been canceled. Concurrent calls are serialized; there is no ordering guarantee between them.

An error from the connection or the server ends the stream: there is no reconnect, so every later call returns None, and a caller that wants to resume must open a new stream from the last sequence number it received. An error converting a single item, such as a BCS decode failure, only affects that item; the next call continues with the following one.

public async Task<GrpcCheckpointStreamItem?> Next()

Returns​

Task<GrpcCheckpointStreamItem>

Exceptions​

SdkFfiException