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); }
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(); }
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", ""); }