diff options
-rw-r--r-- | testprogs/ejs/echo.js | 34 |
1 files changed, 34 insertions, 0 deletions
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(); + + + |