From 52f481b666f0dade2b6fa8da851bb4a407fe4df9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 2 Jul 2005 05:22:12 +0000 Subject: r8070: a (as yet not working) example of how rpc calls might be made from js scripts (This used to be commit b9e73fa932e8289b756b557faeca1690c02a21ed) --- testprogs/ejs/echo.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 testprogs/ejs/echo.js (limited to 'testprogs') diff --git a/testprogs/ejs/echo.js b/testprogs/ejs/echo.js new file mode 100644 index 0000000000..6d01f69a5c --- /dev/null +++ b/testprogs/ejs/echo.js @@ -0,0 +1,34 @@ +/* + demonstrate access to rpc calls from ejs +*/ + +function irpcObj() +{ + var o = new Object(); + o.in = new Object(); + return o; +} + +function test_AddOne() +{ + var status; + var conn = new Object(); + var io = irpcObj(); + + status = rpc_connect(conn, "ncacn_ip_tcp:localhost", "rpcecho"); + printVars(status); + printVars(conn); + + io.in.in_data = 3; + status = rpc_call(conn, "echo_AddOne", io); + printVars(status); + printVars(io); +} + + +print("Starting\n"); + +test_AddOne(); + + + -- cgit