Ejemplo n.º 1
0
 public void Test1()
 {
     var netronics = new Netronics.Netronics(new HttpProperties(()=>new TestHandler(), 8888));
     netronics.Start();
     var request = WebRequest.Create("http://127.0.0.1:8888/a?b=c");
     request.GetResponse();
     netronics.Stop();
 }
Ejemplo n.º 2
0
        public void Test2()
        {
            var handler = new HttpHandler();
            handler.AddStatic("/file/(*)","./www/file/{0}");/*
            handler.AddDynamic("/test.web", requestData =>
                                                {
                                                    return new Response();
                                                });*/

            var netronics = new Netronics.Netronics(new HttpProperties(() => handler, 8888));
            netronics.Start();
            var request = WebRequest.Create("http://127.0.0.1:8888/a?b=c");
            request.GetResponse();
            netronics.Stop();
        }