Thanks guys,

and, there's no way to list interface addresses in a portable way, is there?

Right now I'm using a  hb_InetGetHosts( NetName() ), but I'm not sure it's the
best way to go.

Maurilio.


Przemysław Czerpak wrote:
> 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)
> Harbour@harbour-project.org
> http://lists.harbour-project.org/mailman/listinfo/harbour
> 

-- 
 __________
|  |  | |__| Maurilio Longo
|_|_|_|____| farmaconsult s.r.l.


_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to