Example #1
0
        //TODO: remove this hack
        public static Xauth GetAuthByHack(string host, int display)
        {
            Console.WriteLine("GetAuthByHack host: " + host + ", dpy: " + display);
            if (host == null || host == String.Empty)
            {
                host = "localhost.localdomain";
            }

            Xau xau = new Xau();

            foreach (Xauth auth in xau)
            {
                Console.WriteLine(auth.Address);
                if (host != auth.Address)
                {
                    continue;
                }

                if (display.ToString() != auth.Number)
                {
                    continue;
                }

                return(auth);
            }

            //no auth found
            return(null);
        }
Example #2
0
        public static Xauth GetAuthByAddr(SocketAddress address, string number)
        {
            Console.WriteLine("Looking for: " + address);
            Xau xau = new Xau();

            foreach (Xauth auth in xau)
            {
                Console.WriteLine(auth.Address);

                /*
                 * if (address != auth.Address)
                 *      continue;
                 *
                 * if (number != auth.Number)
                 *      continue;
                 */

                Console.WriteLine(address.Family);
                Console.WriteLine(address.Size);
            }

            return(null);
        }
Example #3
0
 public Xau() : this(Xau.GetFileName())
 {
 }