As of my experience, the best on any platform is, to use either telnet:
Code: Select all
~> telnet 127.0.0.1 4711
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
(+ 1 2 3 4)
10
(symbols)
(! != $ $0 $1 $10 $11 $12 $13 $14 $15 $2 $3 $4 $5 $6 $7 $8 $9 $args $idx $it $main-args
% & * + - / : < << <= = > >= >> ? @ Class MAIN NaN? Tree ^ abort abs acos acosh
add address amb and append append-file apply args array array-list array? asin asinh
...
unify unique unless unpack until upper-case utf8 utf8len uuid wait-pid when while
write-buffer write-char write-file write-line xfer-event xml-error xml-parse xml-type-tags
zero? | ~)
or 'net-eval' from another newLISP instance:
Code: Select all
> (net-eval "localhost" 4711 '(+ 1 2 3 4 5))
15
>
You also can use 'net-eval' from the shell command-line this way:
Code: Select all
newlisp -e '(net-eval "localhost" 4711 "(symbols)")'
I have used nc too, and there is a util/nclocal.c in the source distribution to test servers on local-domain UNIX sockets, but there is a lot less typing when using above methods.
Also note, that all of the above methods only test the command-line protocol mode used in 'net-eval'. To test HTTP protocol mode of newLISP server, you would need either a web-browser, or you can do it interactively too from a telnet client or a second newLISP instance:
then hit the enter-key twice.
Note that most of the above is also explained in the users manual and here:
http://www.newlisp.org/downloads/CodePa ... tml#toc-21
ps: edited for forgotten single quote before net-eval expression