Ejemplo n.º 1
0
 // Web用户上线
 public void WebLogin(ReporterLoginInputHub input)
 {
     _WebConnections[input.ReporterId] = new ReporterLoginHub()
     {
         HubId      = input.HubId,
         Name       = input.Name,
         ReporterId = input.ReporterId,
         Type       = input.Type
     };
 }
Ejemplo n.º 2
0
 // APP用户上线
 public void AppLogin(ReporterLoginInputHub input)
 {
     // 每次登陆id会发生变化
     // 保存该用户信息
     //Logger.Debug("Server: " + Context.ConnectionId);
     //Logger.Debug("Client: " + Context.ConnectionId);
     _ReporterConnections[input.ReporterId] = new ReporterLoginHub()
     {
         HubId      = input.HubId,
         Name       = input.Name,
         ReporterId = input.ReporterId,
         Type       = input.Type
     };
     this.SendToWebMessage(_ReporterConnections[input.ReporterId]);
 }