Skip to main content

Module write

Module write 

Available on crate feature tokio only.
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, which is owed them because they are acknowledged. On a graceful close, also flushes the remaining outbound bytes.
write_or_flush ๐Ÿ”’
Writes one chunk of pending to write, or flushes when pending is empty.