Kotlin: Stream.awaitOpen()
DESCRIPTION
Open a Stream.
This function is meant to be used in a Kotlin coroutine to suspend execution until the stream is open or an error occurs.
DECLARATION
suspend fun Stream.awaitOpen(
port: Int,
)
PARAMETERS
port:- The stream port to use on the remote server, a streamport is a demultiplexing id.
THROWS EXCEPTIONS
NabtoRuntimeException:- with error code
STOPPEDif the stream or a parent object was stopped. NabtoRuntimeException:- with error code
NOT_CONNECTEDif the connection is not established yet.