Question about net-eval

Q&A's, tips, howto's
Locked
dexter
Posts: 74
Joined: Fri Nov 11, 2011 12:55 am

Question about net-eval

Post by dexter »

I want to invoke remote newlisp funcitons by net-eval
of course, I may need pass some args from local

in remote server,I just write a newlisp script

Code: Select all

(define (test str)
    (print (string "haha " str (date-value) ) )
)
pretty simple, this funciton receive a str arg pass from local server ,hopefuly it can return a string
"haha" with str passed by and the (date-value)

I ran it like newlisp test.lsp -c -d 4711

now the local part

local part is simple,too

I opened a newlisp on my mac ,and run

Code: Select all

(net-eval "192.168.14.101" 4711 "(test \"hey\")" 1000)
of course, server is 192.168.14.101

I want pass the "hey" to the server
But server only return with "haha"
nothng else

why?
where is the str and the (date-value) ?

or net-eval can not pass any args to remote?

btw: my newlisp is 10.4.3

Ormente
Posts: 23
Joined: Tue Aug 31, 2010 1:54 pm
Location: Near Mâcon, France

Re: Question about net-eval

Post by Ormente »

Just remove the call to print.

dexter
Posts: 74
Joined: Fri Nov 11, 2011 12:55 am

Re: Question about net-eval

Post by dexter »

And

How is newlisp avoid from [cmd] func () (exit) [/cmd] exiting?

this [cmd] func () (exit) [/cmd] is from net-eval

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: Question about net-eval

Post by Lutz »

In demon -d mode newLISP server will only reset, close the current connection and listen for a new connection request, but will not exit:

http://www.newlisp.org/downloads/newlis ... tml#daemon

Locked