Пример #1
0
 public Broadcaster()
 {
     _hubContext = GlobalHost.ConnectionManager.GetHubContext<MoveShapeHub>();
     _model = new ShapeModel();
     _modelUpdated = false;
     _broadcastLoop = new Timer(
         BroadcastShape,
         null,
         BroadcastInterval,
         BroadcastInterval);
 }
Пример #2
0
 public void UpdateModel(ShapeModel clientModel)
 {
     clientModel.LastUpdatedBy = Context.ConnectionId;
     _broadcaster.UpdateShape(clientModel);
 }
Пример #3
0
 public void UpdateShape(ShapeModel clientModel)
 {
     _model = clientModel;
     _modelUpdated = true;
 }