Beispiel #1
0
        /// <summary>
        /// Initialize the Program given an IP Adress and a port.
        /// </summary>
        /// <param name="address">The address to listen to</param>
        /// <param name="port">The port to listen to</param>
        public Program(KastConfiguration master, Logger logger)
        {
            MainServitor = new Servitor (IPAddress.Parse(master.Get("server_address")),
                int.Parse(master.Get("server_port")));
            Log = logger;
            MasterConfig = master;
            Relay = new KastRelay (master, logger);

            // Tick delay is read in seconds
            TickDelay = (int) double.Parse(master.Get("settings_tick_delay"))*(1000);
        }
Beispiel #2
0
 /// <summary>
 /// Create a new Server, listening to the
 /// default port of 4206.
 /// <param name="master">The master configuration to use</param>
 /// </summary>
 public Program(KastConfiguration master)
 {
     MainServitor = new Servitor();
     Relay = new KastRelay(master, new Logger(master.Get("log")));
     TickDelay = 1000;
 }