Re: A Issue in HTTP::%LOCAL-HOST-PARSED-IP-NUMBER when start CL-HTTP on specific x.x.x.x address and port
"Chun Tian (binghe)" <[email protected]> Wed, 23 Mar 2011 21:42:10 +0800
| Newsgroups | gmane.lisp.cl-http |
|---|---|
| Message-ID | <[email protected]> |
Hi, Martin >> >> To make things work, I have to change the definition of %local-host-parsed-ip-number into this: >> >> (in-package :www-utils) >> >> (defun %local-host-parsed-ip-number () >> (or (ipc:string-ip-address (local-machine-instance)) >> (ipc:internet-address (local-machine-instance)))) >> >> Is this reasonable, or is there any other solution? > > It looks reasonable to me (the function %parse-internet-address does something > similar). I would bind the result of calling (local-machine-instance) in a > variable. > > I am slightly puzzled why you get an error though, because > > (comm:get-host-entry "192.168.150.12" :fields '(:address)) > > returns the correct number for me, even though 192.168.150.12 is not > resolvable in the DNS. Sorry, but I've tried this on both LWM and LWL64, only NIL was returned: CL-USER 2 > (comm:get-host-entry "192.168.150.12" :fields '(:address)) NIL If I call COMM:GET-HOST-ENTRY with "localhost" and without :FIELDS keyword argument, it even didn't return any value: CL-USER 7 > (comm:get-host-entry "localhost") ; this one, no value returned. CL-USER 8 > (comm:get-host-entry "localhost" :fields '(:address)) 2130706433 _______________________________________________ WWW-CL mailing list [email protected] https://lists.csail.mit.edu/mailman/listinfo/www-cl