public static void Main(string[] args) { QniProgramSimple.Init(); var hub = new QniHub(QniEntry); var hubHandle = hub.Handle; var programTask = Task.Run(() => { StartProgram(hubHandle); }); Console.WriteLine("Input Q to exit..."); while (true) { if (Console.ReadLine() == "Q") { break; } } hub.Exit(); Console.WriteLine("Wait program exit..."); programTask.Wait(); hub.Dispose(); }
private static void StartProgram(IntPtr hubHandle) { QniProgramSimple.StartNewProgram(hubHandle, "127.0.0.1:4434"); }