Ejemplo n.º 1
0
        public static async Task Main(string[] args)
        {
            var msDelay = 50;

            if (args.Length > 0)
            {
                msDelay = int.Parse(args[0]);
            }

            var uriString = "ws://localhost:48689";

            if (args.Length > 1)
            {
                uriString = args[1];
            }

            var uri   = new Uri(uriString);
            var tasks = new List <Task>();

            while (true)
            {
                var client       = new MatcherChiefClient(uri);
                var request      = GetRequest();
                var responseTask = client.GetMatch(request, CancellationToken.None);
                tasks = tasks.Where(x => !x.IsCompleted).Concat(new [] { responseTask }).ToList();
                await Task.Delay(msDelay);
            }
        }
 public MatcherChiefClientTests()
 {
     _sut = new MatcherChiefClient(new Uri("ws://localhost:48689"));
 }