private static void StartRtmpWatcherThread(string targetNic) { var watcher = new RtmpWatcherInterop(); var thread = new Thread(() => watcher.Start(targetNic, 21935, PacketHandler.OnPacketFound)); thread.Start(); thread.Join(); }
static void Main(string[] args) { var watcher = new RtmpWatcherInterop(); var thread = new Thread(() => watcher.Start(21935, OnPacketFound)); thread.Start(); // Console.ReadKey(); // // watcher.Complete(); // // Console.WriteLine("Done!"); // // Console.ReadKey(); thread.Join(); }