Пример #1
0
 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;
 }
Пример #2
0
 /// <summary>
 /// 
 /// </summary>
 public HttpListenerProxy(HttpSettings settings)
 {
     _settings = settings;
     _listener = new HttpListener();
     ReceiveHandle += OnReceiveCompleted;
 }
Пример #3
0
 /// <summary>
 ///
 /// </summary>
 public HttpListenerProxy(HttpSettings settings)
 {
     _settings      = settings;
     _listener      = new HttpListener();
     ReceiveHandle += OnReceiveCompleted;
 }