private void newClient_ResponseSent(HttpWebServerRequest request, HttpWebServerResponseData response) { if (response.Cache.CacheType == HttpWebServerCacheType.Cache && CachedResponses.ContainsKey(request.ToString()) == false) { CachedResponses.Add(request.ToString(), response); } }
private void newClient_ProcessRequest(HttpWebServerRequest sender) { // Scrub the cache for old responses foreach (string key in new List <string>(CachedResponses.Keys)) { if (CachedResponses[key].Cache.TrashTime >= DateTime.Now) { CachedResponses.Remove(key); } } if (CachedResponses.ContainsKey(sender.ToString()) == true) { sender.Respond(CachedResponses[sender.ToString()]); } else if (ProcessRequest != null) { this.ProcessRequest(sender); } }
private void newClient_ProcessRequest(HttpWebServerRequest sender) { // Scrub the cache for old responses foreach (string key in new List <string>(this.m_cachedResponses.Keys)) { if (this.m_cachedResponses[key].Cache.TrashTime >= DateTime.Now) { this.m_cachedResponses.Remove(key); } } if (this.m_cachedResponses.ContainsKey(sender.ToString()) == true) { sender.Respond(this.m_cachedResponses[sender.ToString()]); } else if (this.ProcessRequest != null) { FrostbiteConnection.RaiseEvent(this.ProcessRequest.GetInvocationList(), sender); } }
private void newClient_ResponseSent(HttpWebServerRequest request, HttpWebServerResponseData response) { if (response.Cache.CacheType == HttpWebServerCacheType.Cache && this.m_cachedResponses.ContainsKey(request.ToString()) == false) { this.m_cachedResponses.Add(request.ToString(), response); } }
private void newClient_ProcessRequest(HttpWebServerRequest sender) { // Scrub the cache for old responses foreach (string key in new List<string>(this.m_cachedResponses.Keys)) { if (this.m_cachedResponses[key].Cache.TrashTime >= DateTime.Now) { this.m_cachedResponses.Remove(key); } } if (this.m_cachedResponses.ContainsKey(sender.ToString()) == true) { sender.Respond(this.m_cachedResponses[sender.ToString()]); } else if (this.ProcessRequest != null) { FrostbiteConnection.RaiseEvent(this.ProcessRequest.GetInvocationList(), sender); } }
private void newClient_ProcessRequest(HttpWebServerRequest sender) { // Scrub the cache for old responses foreach (string key in new List<string>(CachedResponses.Keys)) { if (CachedResponses[key].Cache.TrashTime >= DateTime.Now) { CachedResponses.Remove(key); } } if (CachedResponses.ContainsKey(sender.ToString()) == true) { sender.Respond(CachedResponses[sender.ToString()]); } else if (ProcessRequest != null) { this.ProcessRequest(sender); } }