ReadonlyblockReadonlypeerThe peer's full JID.
ReadonlyreadableReadonlysidBest-effort
Flushes any buffered partial block, waits for every outstanding block to
be acknowledged, and sends
Hands the bytes over: a sub-block remainder stays buffered by reference until a later write or close() sends it, so the caller must not mutate the array after this resolves (the same contract as a WHATWG or Node stream sink — reusing a scratch buffer between writes corrupts the tail).
Resolves once every full block it produced has been sent, not acked:
with a window > 1 those blocks are still outstanding. It still blocks
while the window is full, so it remains the backpressure the callers'
pump loops rely on — it just yields after window blocks instead of
one. A block that fails later is reported by a subsequent write() or by
close(), which waits for every outstanding ack.
One IBB session used in both directions:
readableis what the peer sends, write() is what we send, on the same sid with independent seq counters.There is no half-close. close() and abort() end both directions, and so does the peer's :
readablethen ends cleanly and later writes reject. Cancellingreadableis an abort — a tunnel whose reader has gone has nobody left to read the answer.