net-close

Started by newdep, February 26, 2004, 12:57:39 PM

Previous topic - Next topic

newdep

Hello Lutz,





Just a currious question..



When using 'net-close in a new started console the following happens;

and i was just currious if behaviour is related to the stderr stdin stdout?



>(net-close 0)  # loops the console prompt



>(net-close 1)  # waits



>(net-close 2)  # returns true



PS: it would actualy be nice to be able in newlisp to have

access to a list using network functions, like: (net-close (net-sessions))





Regards,

Norman.
-- (define? (Cornflakes))

Lutz

#1
'net-close' ends up using the same function as 'close' is using. This is why 'net-close' on 0,1,2 affects stderr, sdin stdout.



In lisp there is a construct to make fucntions work on lists which is called 'map', so you could do:



(map close (net-sessions))



But careful do not  do this in newLISP-tk environment becuase two TCP/IP connections are open to communicate between newlisp and newlisp-tk.



Lutz