IQueryReceipt

interface IQueryReceipt : IAsyncReceipt<QueryResponse>

Notifies a sender of QueryResponses from the peer.

If expecting multiple responses, handle the onResponse event to receive each response. Only the final response is returned from the wait() function.

When expecting a single response, either handle the onResponse event or call the wait() suspending function.

Functions

Link copied to clipboard
abstract suspend fun wait(): QueryResponse

Wait for a response from the remote peer.

Properties

Link copied to clipboard
abstract val identity: String

Unique identity of the receipt.

Link copied to clipboard
abstract val onResponse: SharedFlow<QueryResponse>

Event raised when a response is received from a remote peer. The event is raised once for each part of a multipart QueryResponse.