private static HttpSettings LoadHttpSetting() { string preKey = "HttpListener"; var setting = new HttpSettings(); setting.HostAddress = ConfigUtils.GetSetting(preKey + ".Host"); setting.Port = ConfigUtils.GetSetting(preKey + ".Port", "80").ToInt(); setting.GameAppName = ConfigUtils.GetSetting(preKey + ".GameAppName"); setting.RequestTimeout = ConfigUtils.GetSetting(preKey + ".RequestTimeout", "120000").ToInt(); return setting; }
/// <summary> /// /// </summary> public HttpListenerProxy(HttpSettings settings) { _settings = settings; _listener = new HttpListener(); ReceiveHandle += OnReceiveCompleted; }