read

expect abstract fun read(): T?

Read the next length-prefixed message on the stream and return it. Returns null if there are no further messages on this stream.

Throws

IOException

if the next message cannot be read, or if the stream was abnormally terminated by its producer.

actual abstract fun read(): T?
actual abstract fun read(): T?
actual abstract fun read(): T?