Re: A Issue in HTTP::%LOCAL-HOST-PARSED-IP-NUMBER when start CL-HTTP on specific x.x.x.x address and port
Martin Simmons <[email protected]> Wed, 23 Mar 2011 21:04:57 GMT
| Newsgroups | gmane.lisp.cl-http |
|---|---|
| Message-ID | <[email protected]> |
>>>>> On Wed, 23 Mar 2011 21:42:10 +0800, Chun Tian (binghe) said: > > 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 Sorry, it was my fault -- I can repeat it now. Calling ipc:string-ip-address is the right solution. -- Martin Simmons LispWorks Ltd http://www.lispworks.com/ _______________________________________________ WWW-CL mailing list [email protected] https://lists.csail.mit.edu/mailman/listinfo/www-cl