Esempio n. 1
0
 public IpcHttpHandler()
 {
     server = new NanoServer(IPAddress.Loopback, 9614);
     server.RequestReceived += (sender, args) =>
     {
         HandleRequest(args.RequestContext);
     };
 }
Esempio n. 2
0
        public void TestServer()
        {
            var me     = new ManualResetEvent(false);
            var server = new NanoServer(IPAddress.Loopback, 5454);

            server.RequestReceived += (a, b) =>
            {
                me.Set();
            };
            server.Start();
            //new Thread(() => server.Start());
            //Thread.Sleep(200000000);
            ////var wr = WebRequest.CreateHttp("http://127.0.0.1:5454/hello");
            ////wr.GetResponse().GetResponseStream().Close();
            //me.WaitOne();
        }