示例#1
0
文件: FFCM.cs 项目: 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);
 }
示例#2
0
文件: ServeTest.cs 项目: Centny/cswf
        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();
        }
示例#3
0
文件: DTM_C.cs 项目: 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", "");
 }