Esempio n. 1
0
        public void BeginLoop(ManualResetEvent go)
        {
            //Call this before starting a peer connection
            SpitfireRtc.InitializeSSL();
            Spitfire.AddServerConfig(new ServerConfig {
                Host = "52.210.97.83", Username = "******", Password = "******", Port = 3478, Type = ServerType.Turn
            });
            //Spitfire.AddServerConfig("turn:52.210.97.83:3478?transport=tcp", "dvw", "helloice1");

            var started = Spitfire.InitializePeerConnection();

            if (started)
            {
                go.Set();
                //Keeps the RTC thread alive and active
                while (!Token.Token.IsCancellationRequested && Spitfire.ProcessMessages(1000))
                {
                    Spitfire.ProcessMessages(1000);
                }
                //Do cleanup here
                Console.WriteLine("WebRTC message loop is dead.");
            }
        }