开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜