العرضar

استقبال

Translation status: العربية reader-locale proof. Term names and code fences follow the ar pack; supporting prose may still be English.

typed inbound قناة stream view

Syntax:

Category#

endpoint

Examples#

radix/corpus/ad/sermo-tuus.fab (canonical · method)#

typed inbound قناة stream view

# =============================================================================
# استقبال — typed inbound قناة stream view.
# =============================================================================
#
# What this teaches:
#   • Typed inbound stream — `s.tuus<T>()` creates a typed view over the
#     incoming frames of a قناة connection
#   • Cursor consumption — cursor() yields frames that can be iterated with
#     `كرر من`
#
# Common mistakes:
#   • confusing اتصل route syntax — accessing `استقبال<T>` stream after `fini()` has been called leaves no usable data
#
# See also: اتصل, قناة, إطار, cursor
# =============================================================================

# sermo.tuus<T>() — typed inbound frame stream

main {
    const قناة s ← call 'runtime:echo' ("salve")
    for from s.tuus<string>().cursor() const frame {
        assert frame.data ≡ "salve"
    }
}

Expected output: