I want a way to detect that the client has closed the socket so I can deregister
it, but I can not find any suitable way to do it.
My question is similar to Detecting client hangup in MIO, but there are two main differences:
I need a cross-platform solution. According to the source code of mio 0.6,
hup
is a UNIX-only thing, my code should also work on Windows.The API of mio dramatically changed since 0.3.