Exemplo n.º 1
0
        /**
         * Initialization. Called by CSpect.
         * Returns a list with the ports to be registered.
         */
        public List <sIO> Init(iCSpect _CSpect)
        {
            string version = typeof(Main).Assembly.GetName().Version.ToString();

            ProgramName  = typeof(Main).Assembly.GetName().Name;
            ProgramName += " v" + version;
            string dzrpVersion = Commands.GetDzrpVersion();

            Log.WriteLine("v{0} started. DZRP v{1}.", version, dzrpVersion);

            CSpect = _CSpect;

            // Read settings file (port)
            Settings    = Settings.Load();
            Log.Enabled = Settings.LogEnabled;


            //Server.Listen(Settings.Port);
            CSpectSocket.Port = Settings.Port;
            CSpectSocket.StartListening();

            // No ports
            List <sIO> ports = new List <sIO>();

            return(ports);
        }