Exemple #1
0
 public Broadcaster()
 {
     _hubContext = GlobalHost.ConnectionManager.GetHubContext<MoveShapeHub>();
     _model = new ShapeModel();
     _modelUpdated = false;
     _broadcastLoop = new Timer(
         BroadcastShape,
         null,
         BroadcastInterval,
         BroadcastInterval);
 }
Exemple #2
0
 public Broadcaster()
 {
     //tworzy połączenie hub, zapamiętuje referencję, więc możemy je cały czas używać
     _hubContext   = GlobalHost.ConnectionManager.GetHubContext <MoveShapeHub>();
     _model        = new ShapeModel();
     _modelUpdated = false;
     // zaczyna zliczać wychodzące wiadomości
     _broadcastLoop = new Timer(
         BroadcastShape,
         null,
         BroadcastInterval,
         BroadcastInterval);
 }
Exemple #3
0
 public void UpdateModel(ShapeModel clientModel)
 {
     clientModel.LastUpdatedBy = Context.ConnectionId;
     _broadcaster.UpdateShape(clientModel);
 }
Exemple #4
0
 public void UpdateShape(ShapeModel clientModel)
 {
     _model = clientModel;
     _modelUpdated = true;
 }
Exemple #5
0
 public void UpdateModel(ShapeModel shapeModel)
 {
     this.shapeModel = shapeModel;
     shouldUpdateShape = true;
     UpdateShape(null);
 }
Exemple #6
0
 public void UpdateModel(ShapeModel clientModel)
 {
     clientModel.LastUpdatedBy = Context.ConnectionId;
     shapeBroadCaster.UpdateModel(clientModel);
 }
Exemple #7
0
 public void UpdateModel(ShapeModel clientModel)
 {
     clientModel.LastUpdatedBy = Context.ConnectionId;
     // updatuje shapemodel po stronie klienta w zależności od tego co dostał
     _broadcaster.UpdateShape(clientModel);
 }
Exemple #8
0
 public void UpdateShape(ShapeModel clientModel)
 {
     _model        = clientModel;
     _modelUpdated = true;
 }