我开始使用chatjs.net实现网络聊天系统.但我不知道朋友列表应该绑定聊天列表.我推荐房间聊天与ROOM_ID_STUB是用户名记录.但我的案例中的朋友列表将显示在线和离线用户,不像所有示例chatjs.net只会是单人间.
任何人都可以建议我绑定我的朋友列表的正确方法,并记录每个用户将有一个聊天室,他们一起分享房间聊天列表?
public class ChatHub : Hub, IChatHub
{
/// <summary>
/// This STUB. In a normal situation, there would be multiple rooms and the user room would have to be
/// determined by the user profile
/// </summary>
public const string ROOM_ID_STUB = "chatjs-room";
/// <summary>
/// Current connections
/// 1 room has many users that have many connections (2 open browsers from the same user represents 2 connections)
/// </summary>
private static readonly Dictionary<string, Dictionary<int, List<string>>> …Run Code Online (Sandbox Code Playgroud)