Example #1
0
File: FFCM.cs Project: Centny/ffcm
 public FFCM(DTM_C dtmc, Server srv)
 {
     this.DTMC = dtmc;
     this.Srv = srv;
     this.Srv.AddH("^/notify(\\?.*)?", this.OnFfProc);
     this.Srv.AddH("^/status(\\?.*)?", this.OnStatus);
 }
Example #2
0
        public void TestServer()
        {
            var srv = new Server();
            srv.AddPrefix("http://localhost:1234/");
            srv.AddF("^/testa(\\?.*)?$", this.testa);
            srv.Start();

            var res = H.doGet("http://localhost:1234/testa");
            Console.WriteLine("->" + res.Data);
            srv.Stop();
        }
Example #3
0
File: DTM_C.cs Project: Centny/cswf
 public DTM_C(string name, FCfg cfg, rc.EvnListener evn = null)
     : base(name, evn)
 {
     this.Tasks = new Dictionary<String, Process>();
     this.Cfg = cfg;
     this.Srv = new Server();
     this.addH("start_task", this.StartTask);
     this.addH("wait_task", this.WaitTask);
     this.addH("stop_task", this.StopTask);
     this.Srv.AddF("^/proc(\\?.*)?", this.OnProc);
     this.Token = cfg.Val("token", "");
 }