Overview
Features
Download
Documentation
Community
Add-Ons & Services

Documentation suggestion

Please post support and help requests here.

Documentation suggestion

Postby merdem » 07 Sep 2006, 21:24

Hi,

The SocketAddress class tries to get the local host address when an empty argument is passed to its constructor. The implementation uses gethostbyname if poco decides the passed argument is not a valid IP address.

In my case using an empty address string in the HttpClientSession's constructor makes it try to connect to the local host (actually to the first local host address if multiple Ips exist). All this conversion of the empty argument to the local host address is hidden from the user.

Do you think adding this information to the documentation of SocketAddress or/and HttpClientSession would help future users of the class?

I am still debating if the automatic assumption that "an empty argument to a socket address means local host" is plausible. Another option would be to treat it as an exception, i.e., there can be no empty ip address.

cheers,

Murat
merdem
 
Posts: 14
Joined: 19 Jul 2006, 22:28

Re: Documentation suggestion

Postby peter » 08 Sep 2006, 14:23

> Hi,
>
> The SocketAddress class tries to get the local host address when an empty argument is passed to its constructor. The implementation uses gethostbyname if poco decides the passed argument is not a valid IP address.
>
> In my case using an empty address string in the HttpClientSession's constructor makes it try to connect to the local host (actually to the first local host address if multiple Ips exist). All this conversion of the empty argument to the local host address is hidden from the user.
>
> Do you think adding this information to the documentation of SocketAddress or/and HttpClientSession would help future users of the class?

Definitely agree with you, the docu should state this (and will in the next Poco version).

>
> I am still debating if the automatic assumption that "an empty argument to a socket address means local host" is plausible. Another option would be to treat it as an exception, i.e., there can be no empty ip address.

Well, as long as it is documented, I'd say it's okay...

cu
Peter

>
> cheers,
>
> Murat
peter
 
Posts: 67
Joined: 11 Jul 2006, 16:26
Location: Austria


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest