Inbound

A client's inbound messages one at a time, from Client.inbound: each next is the next message in the order the relay delivered it, awaiting mail when nothing is buffered. It is receive flattened, on the same single-flight wait underneath. Swift iterates it as an AsyncSequence (for try await message in client.inbound()), Kotlin collects asFlow(); both are thin hand-written wrappers over next. It holds the client, so a loop over it keeps the client alive, and releasing both ends the wait. A message goes to whichever next is waiting, so run one loop per client.

Constructors

Link copied to clipboard
constructor(pointer: Pointer)
constructor(noPointer: NoPointer)

This constructor can be used to instantiate a fake object. Only used for tests. Any attempt to actually use an object constructed this way will fail as there is no connected Rust object.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun Inbound.asFlow(): Flow<Message>

This inbound's messages as a Flow: one at a time, as they arrive, from the generated next. It ends only by throwing; cancelling the collector ends it too.

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun destroy()
Link copied to clipboard
open suspend override fun next(): Message

The next message, awaiting mail if none is buffered.

Link copied to clipboard
fun uniffiClonePointer(): Pointer