receive

abstract suspend fun receive(): WebRtc.DataChannel.Message(source)

Suspends until a message is available in the data channel and returns it.

This method will suspend the current coroutine until a message is received. The message can be either text or binary data.