Ejemplo n.º 1
0
        public static void Main()
        {
            IService s = new AirDiskService(81, "toto", string.Format("waMA={0}", ResolverHelper.GetMacAddresses().First().ToString()), string.Format("adVF=0x81,adVN=toto,adVU={0}", Guid.NewGuid()));

            s.Publish();
            Console.ReadLine();
            s.Stop();
        }
Ejemplo n.º 2
0
        public Airplay(ushort port)
        {
            HostName = Environment.MachineName + ".local.";
            Name     = ResolverHelper.GetMacAddresses().First() + "@" + Environment.MachineName;
            Protocol = "_raop._tcp.local.";
            properties.Add("txtvers", "1");
            properties.Add("vn", "3");
            properties.Add("pw", "false");
            properties.Add("sr", "44100");
            properties.Add("ss", "16");
            properties.Add("ch", "2");

            properties.Add("cn", "0,1");
            properties.Add("et", "0,1");
            properties.Add("ek", "1");
            properties.Add("sv", "false");
            properties.Add("sm", "false");
            properties.Add("tp", "TCP,UDP");
            EndPoint ep = ResolverHelper.GetEndPoint();

            ep.Port = port;
            this.addresses.Add(ep);
        }