Exemplo n.º 1
0
        private static IPEndPoint GetEndpoint(ControlledStationOptions options)
        {
            IPAddress ip;

            if (string.IsNullOrEmpty(options.Host))
            {
                ip = IPAddress.Loopback;
            }
            else
            {
                var host = Dns.GetHostEntry(options.Host);
                ip = host.AddressList[0];
            }

            return(new IPEndPoint(ip, options.Port));
        }
Exemplo n.º 2
0
 public ControlledStation(ControlledStationOptions options)
 {
     this.options = options;
     cts          = new CancellationTokenSource();
     connections  = new Dictionary <Guid, EstablishedConnection>(options.MaxParallelControllers);
 }