示例#1
0
        public void Initialize()
        {
            var world = _container.Resolve <World>();

            World.Instance = world;

            world.LoadAreas();

            var portNumber = int.Parse(ConfigurationManager.AppSettings.Get("PortNumber"));
            var listener   = new TelnetListener();

            AddListener(listener);
            listener.StartListening(portNumber);
        }
示例#2
0
 public void AddListener(TelnetListener listener)
 {
     _listeners.Add(listener);
     listener.ConnectionReceived += AcceptConnection;
 }