भेजना
Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.
live outbound and inbound चैनल directional views
Syntax:
Category#
endpoint
Related#
Examples#
radix/corpus/ad/sermo-live-directional.fab (canonical · method)#
live outbound and inbound चैनल directional views
# =============================================================================
# भेजना — live outbound and inbound चैनल directional views.
# =============================================================================
#
# What this teaches:
# • Directional चैनल views — `भेजना<T>` for outbound frames, `पाना<T>` for
# inbound frames on a चैनल connection
# • Cursor iteration — `दोहराओ सेवन t.cursor()` consumes inbound frames
# • Accipe reception — `accipe()` pulls a single फ़्रेम from the inbound
# कतार
#
# Common mistakes:
# • confusing `भेजना` (outbound) and `पाना` (inbound) चैनल directional views, or mixing accipe/cursor/exhauri without intentional ordered consumption
#
# See also: सेवा, चैनल, पाना, फ़्रेम, संकेतक, accipe
# =============================================================================
# Live `भेजना<T>` / `पाना<T>` directional views
#
# runtime:echo returns one inbound पाठ frame per conversation.
# accipe, संकेतक, and exhauri may share one पाना कतार; mix them only when
# ordered consumption is intentional.
main {
const चैनल s ← call 'runtime:echo' ("salve")
const भेजना<string> m ← s.meus<string>()
m.da("ping")
const status outbound ← m.fini()
const पाना<string> t ← s.tuus<string>()
for from t.cursor() const frame {
assert frame.data ≡ "salve"
}
const status inbound ← t.fini()
const चैनल s2 ← call 'runtime:echo' ("salve")
const पाना<string> t2 ← s2.tuus<string>()
const फ़्रेम<string> ∪ none got ← t2.accipe()
const status accipe_done ← t2.fini()
print outbound
print inbound
print got
print accipe_done
}