summaryrefslogtreecommitdiff
path: root/Resources/DefaultContent/Libraries/json4lua/examples/jsonrpc.lua
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-10-26 11:32:46 +0800
committerchai <chaifix@163.com>2021-10-26 11:32:46 +0800
commit0549b1e5a8a3132005e275d6026db8003cb067d2 (patch)
treef0d7751ec32ecf5c4d23997fa0ffd3450a5a755a /Resources/DefaultContent/Libraries/json4lua/examples/jsonrpc.lua
parent32345800737b668011a87328cd3dcce59ec2934c (diff)
*rename folder
Diffstat (limited to 'Resources/DefaultContent/Libraries/json4lua/examples/jsonrpc.lua')
-rw-r--r--Resources/DefaultContent/Libraries/json4lua/examples/jsonrpc.lua21
1 files changed, 0 insertions, 21 deletions
diff --git a/Resources/DefaultContent/Libraries/json4lua/examples/jsonrpc.lua b/Resources/DefaultContent/Libraries/json4lua/examples/jsonrpc.lua
deleted file mode 100644
index f265b8a..0000000
--- a/Resources/DefaultContent/Libraries/json4lua/examples/jsonrpc.lua
+++ /dev/null
@@ -1,21 +0,0 @@
---
--- jsonrpc.lua
--- Installed in a CGILua webserver environment (with necessary CGI Lua 5.0 patch)
---
-require ('json.rpcserver')
-
--- The Lua class that is to serve JSON RPC requests
-local myServer = {
- echo = function (msg) return msg end,
- average = function(...)
- local total=0
- local count=0
- for i=1, table.getn(arg) do
- total = total + arg[i]
- count = count + 1
- end
- return { average= total/count, sum = total, n=count }
- end
-}
-
-json.rpcserver.serve(myServer) \ No newline at end of file