(net-service) on Windows?

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?

(net-service) on Windows?

Postby kanen » Fri Sep 19, 2014 5:34 pm

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?
. Kanen Flowers http://kanen.me .
kanen
 
Posts: 144
Joined: Thu Mar 25, 2010 6:24 pm

Re: (net-service) on Windows?

Postby Lutz » Fri Sep 19, 2014 6:55 pm

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.
Lutz
 
Posts: 5258
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California


Return to newLISP and the O.S.

Who is online

Users browsing this forum: No registered users and 1 guest

cron