UnitTest_Transports()
        {
            Logger.SetLogLevel(Log.Level.Trace);
            Logger.SetLogLevel(Log.Component.ZsLib, Log.Level.Trace);
            Logger.SetLogLevel(Log.Component.Services, Log.Level.Trace);
            Logger.SetLogLevel(Log.Component.ServicesHttp, Log.Level.Trace);
            Logger.SetLogLevel(Log.Component.OrtcLib, Log.Level.Insane);
            Logger.SetLogLevel("ortc_standup", Log.Level.Insane);


            //openpeer::services::ILogger::installDebuggerLogger();
            Logger.InstallTelnetLogger(59999, 60, true);

            Settings.ApplyDefaults();
            Ortc.Setup();
        }
Example #2
0
        public MainPage()
        {
            this.InitializeComponent();
            Logger.SetLogLevel(Log.Level.Trace);
            Logger.SetLogLevel(Log.Component.ZsLib, Log.Level.Trace);
            Logger.SetLogLevel(Log.Component.Services, Log.Level.Trace);
            Logger.SetLogLevel(Log.Component.ServicesHttp, Log.Level.Trace);
            Logger.SetLogLevel(Log.Component.OrtcLib, Log.Level.Insane);
            Logger.SetLogLevel("ortc_standup", Log.Level.Insane);


            //openpeer::services::ILogger::installDebuggerLogger();
            Logger.InstallTelnetLogger(59999, 60, true);

            Settings.ApplyDefaults();
            Ortc.Setup();
        }
        private async void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            Ortc.Setup();
            Settings.ApplyDefaults();

            var name = GetLocalPeerName();

            Debug.WriteLine($"Connecting to server from local peer: {name}");

            _signaler = new TcpSignaler("my.signaling.server.ip", "8888", name);

            _signaler.Connected        += Signaler_Connected;
            _signaler.ConnectionFailed += Signaler_ConnectionFailed;
            _signaler.PeerConnected    += Signaler_PeerConnected;
            _signaler.PeerMessage      += Signaler_MessageFromPeer;

            // It's important to run the below asynchronously for now as it blocks the current thread while waiting for socket data.
            Task.Run(() =>
            {
                _signaler.Connect();
            });
        }