Module write

Module write 

Expand description

Write-side helpers: the cancellation-safe write arm and the teardown delivery/flush.

Enumsยง

Wrote ๐Ÿ”’
One outcome of write_or_flush.

Constantsยง

GRACEFUL_FLUSH_TIMEOUT ๐Ÿ”’
Upper bound on the teardown flush of a graceful DISCONNECT, so shutdown cannot hang on a peer that stopped reading.

Functionsยง

deliver_and_flush ๐Ÿ”’
Delivers buffered messages to the application (they are acknowledged and owed to it) and, on a graceful close, flushes any remaining outbound bytes.
write_or_flush ๐Ÿ”’
Writes one chunk of pending to write, or flushes when pending is empty.