Kotlin: Stream.awaitStreamClose()
DESCRIPTION
Close a stream.
This is meant to be used in a Kotlin coroutine to suspend execution until the Stream is closed.
DECLARATION
suspend fun Stream.awaitStreamClose()
THROWS EXCEPTIONS
- NabtoRuntimeException:
- With error code STOPPEDif the stream is stopped.
- NabtoRuntimeException:
- With error code OPERATION_IN_PROGRESSif another stop is in progress.
- NabtoRuntimeException:
- With error code INVALID_STATEif the stream is not opened yet.