You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want eagerly detect client disconnections, i.e. before we try to write our response, from our API. Requests can be long running/CPU intensive and don't want to waste cycles unnecessarily.
From this comment in #196 I can see that we could implement the logic ourselves by polling recvBufMsg with MSG_PEEK flag. We could then throw an exception to the thread serving the disconnected client's request.
However, I can't see a way to link the ThreadId of the thread running the request with the Socket that was created when the client connection was accepted. Is there an easy way?
We do have access to SockAddr but I've no idea if that would be unique per live connection.
The text was updated successfully, but these errors were encountered:
We want eagerly detect client disconnections, i.e. before we try to write our response, from our API. Requests can be long running/CPU intensive and don't want to waste cycles unnecessarily.
From this comment in #196 I can see that we could implement the logic ourselves by polling recvBufMsg with
MSG_PEEK
flag. We could then throw an exception to the thread serving the disconnected client's request.However, I can't see a way to link the
ThreadId
of the thread running the request with theSocket
that was created when the client connection wasaccept
ed. Is there an easy way?We do have access to
SockAddr
but I've no idea if that would be unique per live connection.The text was updated successfully, but these errors were encountered: