Пример #1
0
 private void handlerWS(HttpRequest request, HttpResponse response)
 {
     if (oldGateways.Count > 0)
     {
         var inj = (siteIndex++) % oldIndex.Count;
         response.End(oldGateways[inj]);
         return;
     }
     response.End();
 }
Пример #2
0
 private void handler(HttpRequest request, HttpResponse response)
 {
     var dict = new JsDictionary();
     dict["Content-Type"] = "text/html";
     if (oldIndex.Count > 0)
     {
         response.WriteHead(200, dict);
         var inj = (siteIndex++) % oldIndex.Count;
         response.End(oldIndex[inj]);
     }
     else
     {
         response.WriteHead(200, dict);
         response.End();
     }
 }