コード例 #1
0
        public override async Task OnConnectedAsync()
        {
            await base.OnConnectedAsync();

            var client = mOnlineClientManager.GetByConnectionId(Context.ConnectionId);

            if (client == null)
            {
                client = CreateClientForCurrentConnection(Context.GetHttpContext().Request.Query["accessToken"].ToString());
                mOnlineClientManager.Add(client);
            }
        }