Esempio n. 1
0
        // === Loading the services ============================================================
        // =====================================================================================

        private static void Run()
        {
            Timing.TimerThread ttObj = new Timing.TimerThread();
            _TimerThread = new Thread(ttObj.TimerMain)
            {
                Name = "Timing Thread"
            };
            // load resources here
            Invoke("Configure");
            // load save file here
            Invoke("Initialize");
            MessagePump = new NetPump();
            _TimerThread.Start();
            EventSink.InvokeServerStarted();
            try {
                _HttpServer = new WfcServer();
                _HttpServer.Start(MessagePump);
                // new HttpsTestClient(_HttpServer).StartTest();
                Task.WaitAll(
                    RunDnsAsync("8.8.8.8", Config.DnsRedirects),
                    RunCoreLoopAsync());
            }
            catch (Exception e) {
                CurrentDomain_UnhandledException(null, new UnhandledExceptionEventArgs(e, true));
            }
        }
Esempio n. 2
0
 public override void Start(NetPump pump)
 {
     _Wfc27900.Start(pump);
     _Wfc27901.Start(pump);
     _Wfc29900.Start(pump);
     base.Start(pump);
 }
Esempio n. 3
0
 public void Start(NetPump pump)
 {
     pump.OnReceiveWfc27901 += ReceiveWfc27901;
 }
Esempio n. 4
0
 /// <summary>
 /// Starts the server as a (returned) asynchronous task.
 /// </summary>
 public virtual void Start(NetPump pump)
 {
     pump.OnReceiveHttp  += ReceiveHttp;
     pump.OnReceiveHttps += ReceiveHttps;
 }
Esempio n. 5
0
 public void Start(NetPump pump)
 {
     pump.OnConnectWfc29900 += ConnectWfc29900;
     pump.OnReceiveWfc29900 += ReceiveWfc29900;
 }