Kết xuấtvi

nhận

Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.

typed inbound kênh stream view

Syntax:

Category#

endpoint

Examples#

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

typed inbound kênh stream view

# =============================================================================
# nhận — typed inbound kênh stream view.
# =============================================================================
#
# What this teaches:
#   • Typed inbound stream — `s.tuus<T>()` creates a typed view over the
#     incoming frames of a kênh connection
#   • Cursor consumption — con_trỏ() yields frames that can be iterated with
#     `lặp từ`
#
# Common mistakes:
#   • confusing gọi route syntax — accessing `nhận<T>` stream after `fini()` has been called leaves no usable data
#
# See also: gọi, kênh, khung, con_trỏ
# =============================================================================

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

main {
    const kênh s ← call 'runtime:echo' ("salve")
    for from s.tuus<string>().cursor() const frame {
        assert frame.data ≡ "salve"
    }
}

Expected output: