Page 1 of 1
(net-service) on Windows?
Posted: Fri Sep 19, 2014 5:34 pm
by kanen
Is it possible to use (net-service) on Windows?
I've tried a few different ways to do this and none of them seem to work properly.
Anyone?
Re: (net-service) on Windows?
Posted: Fri Sep 19, 2014 6:55 pm
by Lutz
Works for me on Windows XP SP2:
Code: Select all
newLISP v.10.6.0 32-bit on Win32 IPv4/6 libffi, options: newlisp -h
> (net-service "http" "tcp")
80
> (net-service "ftp" "tcp")
21
> (net-service 21 "tcp")
"ftp"
> (net-service 80 "tcp")
"http"
>
on Unix it would depend on the textfile
/etc/services, perhaps on Windows there is something similar somewhere, perhaps in the registry database? For services not registered it would return
nil.