public void Stop() { foreach (var client in clients.Keys) { client.Dispose(); } clients = new ConcurrentDictionary <TcpClient, NewFrameEventHandler>(); source.Stop(); listener.Stop(); listen = false; }
/// <summary> /// Disables the input of the webcam /// </summary> public static void DisableWebcam() { try { source.Stop(); processor.Complete(); } catch (Exception e) { Console.WriteLine(e); throw; } }
public void Stop() { foreach (var client in clients.Keys) { client.Dispose(); } clients = new ConcurrentDictionary <TcpClient, bool>(); source.Stop(); source.NewFrame -= SendNewFrameToClients; listener.Stop(); listen = false; }