示例#1
0
 public override Task OnConnectedAsync()
 {
     if (_gameStarter.AddPlayer(Context.ConnectionId))
     {
         Clients.Caller.SendAsync("getConnectionId", Context.ConnectionId);
     }
     else
     {
         Clients.Caller.SendAsync("gameFull");
     }
     return(base.OnConnectedAsync());
 }