Example #1
0
        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();
        }
Example #2
0
 public RealTimeSample(SocketClient client, CancellationToken cancel)
 {
     //_file = new SendFile(client.Output, LogAsync.Instance.Filename);
     _client = new SendMessage(client.Output);
     _cancel = cancel;
 }
Example #3
0
 public TimerSample(SocketClient client, CancellationToken cancel)
 {
     _client = client;
     _cancel = cancel;
     _interval = TimeSpan.FromSeconds(3);
 }