receive

@Suspendable
inline fun <R : Any> FlowSession.receive(): R

Suspends until a message of type R is received from the counterparty.

Remember that when receiving data from other parties the data should not be trusted until it's been thoroughly verified for consistency and that all expectations are satisfied, as a malicious peer may send you subtly corrupted data in order to exploit your code.

Return

The received data R

Parameters

R

The data type received from the counterparty.