From 7d222a52c70cc78e80ad0bab2f7f77dd03ad12b8 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 4 Jan 2016 21:11:38 +0100 Subject: added a simple server functionality and some SciTECO macros to interface it * the server is basically a second way to modify the Lua state of Applause * concurrently to interactive input, messages can be sent over a TCP socket which are evaluated just like command lines. All stdout/stderr output is returned and the socket is closed. * Server currently hardcoded at 127.0.0.1:10000 * Interruptions are currently not possible. This would require another thread. * The threading could be simplified by making the applause binary a server-only application. The Read-Eval-Print loop could then be a standalone LuaJIT script. --- client.tes | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 client.tes (limited to 'client.tes') diff --git a/client.tes b/client.tes new file mode 100644 index 0000000..77db8ab --- /dev/null +++ b/client.tes @@ -0,0 +1,19 @@ + +! Applause client: Evaluate command ! +@#ae{ + X[applause.output] + EQ[applause.output] + Z\ 5-. 10I + HECnc 127.0.0.1 10000 J + Z"= Q*U* ' +} + +! Print command ! +@#ap{ + X[applause.output] + EQ[applause.output] + I= R + Z\ 5-. 10I + HECnc 127.0.0.1 10000 J + Z"= Q*U* ' +} -- cgit v1.2.3