[usocket-devel] Determining the local host address from wildcard host

Stelian Ionescu sionescu at cddr.org
Sun Mar 7 18:48:40 UTC 2010


On Sat, 2010-03-06 at 22:20 -0800, Elliott Slaughter wrote:
> Hi,
> 
> 
> I'm wondering if there is any way to determine the local host address
> (or addresses) used when I create a socket with :local-host
> *wildcard-host* . When I try to call get-local-address on such a
> socket, I just get #(0 0 0 0).

When you bind a socket to the wildcard address(i.e. 0.0.0.0), you're
listening simultaneously on all interfaces so you can't ask for "the"
host address because there might be more than just one. Furthermore, the
socket doesn't keep trace of the local interfaces that were active when
it was created.

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/usocket-devel/attachments/20100307/8ae5f712/attachment.sig>


More information about the usocket-devel mailing list