Using ktor-network, I'm a bit unsure of the intended lifecycle management of the
SelectorManager
. Should I create one manager per socket, or should there be a single one?
c
Chris Lee
10/15/2024, 8:53 PM
We tend to use a single SelectorManager across sockets.
Chris Lee
10/15/2024, 9:09 PM
in most cases that’s what you want - the underlying selectors are designed to watch for events across multiple sockets and dispatch those (ktor turns all that into coroutines etc).