SignalR - how to detect disconnected clients
How to detect which clients wa开发者_Go百科s disconnected? I'm using Hub and saw the chat example where the IDisconnect
interface was implemented. De Disconnect()
function is called when a page is refreshed or closed, for example. It's working ok, but how to detect which one was disconnected ?
There's a Client id property on the Hub (Context.ClientId) that you can use to figure out which client disconnected.
精彩评论