static void Main(string[] args) { HttpServer.GetInst("http://127.0.0.1:9090/cache/").Run((req) => { var res = RES.FAIL("尚未进行任何处理"); try { var buffer = req.DATA as byte[]; if (0 < buffer.Length) { var jsonString = Encoding.UTF8.GetString(buffer); var jquest = JRequest.Parse(jsonString); if (jquest.Method == "Execute") { var serverId = jquest.Param[0]; var command = jquest.Param[1]; var paramArr = jquest.Param.ToList().Skip(2).Take(jquest.Param.Length - 2).ToArray(); var resExe = REDIS.GetInst("127.0.0.1", 7379).Execute(serverId, command, paramArr); return(RES.OK(resExe, ENUM.数据类型.ByteArray)); } } return(res); } catch (Exception ex) { return(RES.FAIL(ex, ENUM.数据类型.ByteArray)); } finally { } }); Console.WriteLine("Hello World!"); Console.ReadKey(); }