Esempio n. 1
0
        private bool StartServer()
        {
            try
            {
                var rnd = new Random();

                webConf           = new WebServerConfiguration();
                webConf.IPAddress = IPAddress.Any;
                webConf.Port      = 8000 + rnd.Next(99);

                webServer                   = new SubscriberWebServer(webConf);
                webServer.OnLogEvent       += Log;
                webServer.OnNotifyPosition += OnPostionUpdate;
                webServer.Start();

                return(true);
            }
            catch { return(false); };
        }
Esempio n. 2
0
        private bool StartServer()
        {
            try
            {
                var rnd = new Random();

                webConf = new WebServerConfiguration();
                webConf.IPAddress = IPAddress.Any;
                webConf.Port = 8000 + rnd.Next(99);

                webServer = new SubscriberWebServer(webConf);
                webServer.OnLogEvent += Log;
                webServer.OnNotifyPosition += OnPostionUpdate;
                webServer.Start();

                return true;
            }
            catch { return false; };
        }