Example #1
0
        public AirDiskService(ushort port, string diskName, string sys, params string[] dk)
        {
            HostName = Environment.MachineName + ".local.";
            Name     = diskName;
            Protocol = "_adisk._tcp.local.";
            var ep = ResolverHelper.GetEndPoint();

            ep.Port = port;
            this.addresses.Add(ep);
            this["sys"] = sys;
            for (int i = 0; i < dk.Length; i++)
            {
                this["dk" + i] = dk[i];
            }
        }
Example #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);
        }