https://kotlinlang.org logo
#ktor
Title
# ktor
c

Colton Idle

03/23/2024, 1:44 PM
When working with Raw sockets in ktor (im doing some local network programming)... why does ktor not have a flow-able representation of incoming messages? Seems like that would be more of an idiomatic approach.
a

Arjan van Wieringen

03/23/2024, 3:52 PM
Because flows are typically cold.
c

Colton Idle

03/23/2024, 6:41 PM
interesting point. so i guess in this case, you're making the point that incoming messages are hot. good point! i'm working on a small layer on top of raw sockets so I'm trying to abstract away some of the socket code to make it a bit easier to work with and so i think i might try to make it a flow myself
a

Arjan van Wieringen

03/24/2024, 8:24 AM
I believe Ktor uses Channels. These are the correct abstraction for hot data.
c

Colton Idle

03/24/2024, 9:01 AM
Does it? maybe im missing something there. i dont see anything about channels
a

Arjan van Wieringen

03/24/2024, 10:27 AM
c

Colton Idle

03/24/2024, 11:00 PM
thanks for teaching ❤️
j

Joffrey

03/26/2024, 2:29 PM
c

Colton Idle

03/26/2024, 9:25 PM
Thanks! Will give that a read tonight.