receive

suspend fun receive(): ByteArray

Receives one message into an owned byte array. Only one receive or inputs collector may be active. Cancellation closes an active receive's connection.

Return

The next complete SRT message, without media decoding.

Throws

If not connected or another reader is active.

If the peer disconnects or receiving fails.

CancellationException

If the calling coroutine is cancelled.