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); }
public void AddListener(TelnetListener listener) { _listeners.Add(listener); listener.ConnectionReceived += AcceptConnection; }