StartCp() public method

Start the library as a UPnP control point stack
public StartCp ( uint aSubnet ) : ControlPointStack
aSubnet uint
return ControlPointStack
示例#1
0
 public static void Main(string[] args)
 {
     Core.InitParams initParams = new Core.InitParams();
     Core.Library lib = new Core.Library();
     lib.Initialise(initParams);
     lib.StartCp();
     new Runner((int)initParams.MsearchTimeSecs);
     lib.Close();
 }
示例#2
0
 public static void Main(string[] args)
 {
     Core.InitParams initParams = new Core.InitParams();
     using (Core.Library lib = Core.Library.Create(initParams))
     {
         Core.SubnetList     subnetList = new Core.SubnetList();
         Core.NetworkAdapter nif        = subnetList.SubnetAt(0);
         uint subnet = nif.Subnet();
         Console.WriteLine("Using adapter: {0}", nif.Name());
         subnetList.Dispose();
         lib.StartCp(subnet);
         new Runner((int)initParams.MsearchTimeSecs);
     }
 }
示例#3
0
        public override void init()
        {
            mh = new InitParams.MessageHandler(mhCb);
                ml = new MessageListener(mh);

                OpenHome.Net.Core.InitParams initParams = new OpenHome.Net.Core.InitParams();
                OpenHome.Net.Core.Library.SetDebugLevel(Library.DebugLevel.Error);
                initParams.LogOutput = ml;
                lib = OpenHome.Net.Core.Library.Create(initParams);
                OpenHome.Net.Core.SubnetList subnetList = new OpenHome.Net.Core.SubnetList();
                OpenHome.Net.Core.NetworkAdapter nif = subnetList.SubnetAt((uint)networkConnectInfo.subNetIndex);
                this.delegateStartingNetwork(nif.FullName());
                uint subnet = nif.Subnet();
                subnetList.Dispose();
                lib.StartCp(subnet);
        }