cancel

abstract fun cancel()

Truncate this stream abnormally. This attempts to signal to readers of this data that it is incomplete. Note that unlike some cancel methods this is not safe for concurrent use.

A stream must be closed after it is canceled.

Throws

if this stream is closed.