示例#1
0
文件: ChatHub.cs 项目: byHappyCV/Chat
        public async Task ShowFriends(string id)
        {
            if (id == null)
            {
                id = Context.ConnectionId;
            }
            var friends = _friendManager.GetFriends(id);

            await Clients.Client(id).showFriends(friends);

            try
            {
                Clients.All.usersOnline();
            }
            catch (Exception e)
            {
                var v = e.Message;
            }
        }