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(); }
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); } }
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); }