summaryrefslogtreecommitdiff
path: root/swat/esptest/remote.esp
diff options
context:
space:
mode:
Diffstat (limited to 'swat/esptest/remote.esp')
-rw-r--r--swat/esptest/remote.esp19
1 files changed, 19 insertions, 0 deletions
diff --git a/swat/esptest/remote.esp b/swat/esptest/remote.esp
new file mode 100644
index 0000000000..c0f12147a8
--- /dev/null
+++ b/swat/esptest/remote.esp
@@ -0,0 +1,19 @@
+<%
+libinclude("server_call.js");
+
+/* this is a call that the client js code can make - it just adds
+ some more elements to the passed object, then returns the object */
+function testfunc(x) {
+ var sys = sys_init();
+ x.nttime = sys.nttime();
+ x.timestring = sys.httptime(x.nttime);
+ return x;
+}
+
+/* register a call for clients to make */
+var call = servCallObj();
+call.add('testfunc', testfunc);
+
+/* run the function that was asked for */
+call.run();
+%>