I wonder what's the correct way to check if a sock...
# ktor
e
I wonder what's the correct way to check if a socket client is still connected. Should it be •
socket.isClosed
readChannel.isClosedForRead
writeChannel.isClosedForWrite
Or a combination of them?
e
it is possible for sockets to be half-closed, so it depends
a
I think sending some kind of ping packet and receiving the answer is the most reliable solution.