public async void Run(IBackgroundTaskInstance taskInstance) { _backgroundTaskDeferral = taskInstance.GetDeferral(); taskInstance.Canceled += TaskInstance_Canceled; _client = new SocketClient("192.168.0.31", 9000); await _client.ConnectAsync(); var p = new Productor.Productor(); Task t = p.BeginCreateLog(true, false); //ExampleTimer(); ExampleRealTime(); }
public RealTimeSample(SocketClient client, CancellationToken cancel) { //_file = new SendFile(client.Output, LogAsync.Instance.Filename); _client = new SendMessage(client.Output); _cancel = cancel; }
public TimerSample(SocketClient client, CancellationToken cancel) { _client = client; _cancel = cancel; _interval = TimeSpan.FromSeconds(3); }