Пример #1
0
 private static Task LogReportsAsync()
 {
     return(TaskUtil.RunAndWaitForCancel(
                client.ReportLatencyAsync(),
                CancellationToken.None,
                cleanup: null));
 }
Пример #2
0
 public async Task Start(CancellationToken cancellationToken)
 {
     await TaskUtil.RunAndWaitForCancel(
         this.ListenAndProcessDatagrams(cancellationToken),
         cancellationToken,
         this.Stop);
 }
Пример #3
0
 private static Task SendQueriesAsync()
 {
     Console.WriteLine($"Sending DNS queries to {client.options.CurrentValue.NsIpAddress}... (press CTRL-C to quit)\n");
     return(TaskUtil.RunAndWaitForCancel(
                client.SendQueryLoop(),
                CancellationToken.None,
                cleanup: null));
 }