On Thu, 18 Feb 2010, Mindaugas Kavaliauskas wrote:

Hi,

> >Testing hb_InetAddress() on a listening socket I get back 0.0.0.0 while
> >hb_InetPort() works as expected.
> >hb_InetAddress() works when called on a connected socket where it returns the
> >caller IP address.
> >Is this the correct behavior?
> Perhaps, yes. I guess you have not specified the listen address, so,
> socket is listening on all available interfaces (eg. 127.0.0.1,
> 192.168.1.1, and so on on multihomed machine) and hb_InetAddress()
> returns 0.0.0.0 (=INADDR_ANY).

Exactly.
Local server address in this context is interface address.
0.0.0.0 means that socket is listening on all interfaces.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to