blob: 7f01e99a856cd287dfced6bd073aece7a40581a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
-- lib/supple/request.lua
--
-- Sandbox (for) Untrusted Procedure Partitioning (in) Lua Engine
--
-- Request/response serialisation/deserialisation including contextual object
-- management and organisation.
--
-- Copyright 2012 Daniel Silverstone <dsilvers@digital-scurf.org>
--
-- For licence terms, see COPYING
--
local tconcat = table.concat
local function serialise_error(errstr, traceback)
return tconcat {
"error=true,",
("message=%q,"):format(errstr),
("traceback=%q"):format(traceback)
}
end
local function serialise_request(obj, method, ...)
end
local function serialise_response(...)
end
local function deserialise_entity(entity)
end
return {
error = serialise_error,
request = serialise_request,
response = serialise_response,
deserialise = deserialise_entity,
}
|