public Broadcaster() { _hubContext = GlobalHost.ConnectionManager.GetHubContext <MoveShapeHub>(); _model = new ShapeModel(); _modelUpdate = false; _broadcastLoop = new Timer( BroadcastShape, null, BroadcasterInterval, BroadcasterInterval); }
/// <summary> /// Updates the model. /// </summary> /// <param name="clientModel">The client model.</param> public void UpdateModel(ShapeModel clientModel) { clientModel.LastUpdateBy = Context.ConnectionId; _broadcaster.UpdateShape(clientModel); }
/// <summary> /// Updates the shape. /// </summary> /// <param name="clientModel">The client model.</param> public void UpdateShape(ShapeModel clientModel) { _model = clientModel; _modelUpdate = true; }