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.