https://kotlinlang.org logo
#coroutines
Title
# coroutines
j

jean

02/11/2021, 7:56 AM
Is there a specific method I should use on a
Channel
to cast it to a type allowing me only to send/offer? The same way there is
receiveAsFlow
to only be able to collect it, how can I restrict my code to only sending?
a

Ali Albaali

02/11/2021, 8:10 AM
You can cast it as
SendChannel<T>
or
ReceiveChannel<T>
.
👍 1
j

jean

02/11/2021, 8:10 AM
Thanks!
👍 1
2 Views