Ejemplo n.º 1
0
 public Broadcaster()
 {
     // Save our hub context so we can easily use it 
     // to send to its connected clients
     _hubContext = GlobalHost.ConnectionManager.GetHubContext<MoveShapeHub>();
     _model = new ShapeModel();
     _scoreString = new ScoreModel() { Score = "DYNAMIC SCORE UPDATE", Name = "" };
     _modelUpdated = false;
     // Start the broadcast loop
     _broadcastLoop = new Timer(
         BroadcastShape,
         null,
         BroadcastInterval,
         BroadcastInterval);
 }
Ejemplo n.º 2
0
 public Broadcaster()
 {
     // Save our hub context so we can easily use it
     // to send to its connected clients
     _hubContext  = GlobalHost.ConnectionManager.GetHubContext <MoveShapeHub>();
     _model       = new ShapeModel();
     _scoreString = new ScoreModel()
     {
         Score = "DYNAMIC SCORE UPDATE", Name = ""
     };
     _modelUpdated = false;
     // Start the broadcast loop
     _broadcastLoop = new Timer(
         BroadcastShape,
         null,
         BroadcastInterval,
         BroadcastInterval);
 }
Ejemplo n.º 3
0
 public void UpdateModel(ShapeModel clientModel)
 {
     clientModel.LastUpdatedBy = Context.ConnectionId;
     // Update the shape model within our broadcaster
     _broadcaster.UpdateShape(clientModel);
 }
Ejemplo n.º 4
0
 public void UpdateShape(ShapeModel clientModel)
 {
     _model = clientModel;
     _modelUpdated = true;
 }
Ejemplo n.º 5
0
 public void UpdateModel(ShapeModel clientModel)
 {
     clientModel.LastUpdatedBy = Context.ConnectionId;
     // Update the shape model within our broadcaster
     _broadcaster.UpdateShape(clientModel);
 }
Ejemplo n.º 6
0
 public void UpdateShape(ShapeModel clientModel)
 {
     _model        = clientModel;
     _modelUpdated = true;
 }