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));
        }
 public ControlledStation(ControlledStationOptions options)
 {
     this.options = options;
     cts          = new CancellationTokenSource();
     connections  = new Dictionary <Guid, EstablishedConnection>(options.MaxParallelControllers);
 }