Re: NSHost and the IP addresses ...
Re: NSHost and the IP addresses ...
- Subject: Re: NSHost and the IP addresses ...
- From: Malte Tancred <email@hidden>
- Date: Thu, 27 Jun 2002 14:18:26 +0200
On thursday, june 27, 2002, at 01:44 , Guido Neitzer wrote:
I don't have a socket because all my ftp-traffic goes via libcurl.
This is, what I currently do:
CURLOPT_FTPPORT
Pass a pointer to a zero terminated string as parameter.
It will be used to get the IP address to use for the ftp
PORT instruction. The PORT instruction tells the remote
server to connect to our specified IP address. The
string may be a plain IP address, a host name, an net-
work interface name (under Unix) or just a '-' letter to
let the library use your systems default IP address.
Default FTP operations are passive, and thus won't use
PORT.
If I use '-' libcurl gets 127.0.0.1, that's the same what NSHost
returns as the address. On my own box (which has a DNS-entry and a
FQDN) it works just fine - libcurl and NSHost both work with the
correct IP address.
This could be a missing feature or perhaps a bug in libcurl. Wouldn't it
be better if libcurl used the local address of the control socket
instead of the "systems default IP address"?
My initial feeling, without any experience using libcurl, is that the
above option should be split up in two separate options.
I would prefer an option where you simply tell libcurl to use FTP PORT.
This option would use the same address as the control sockets local
address.
If necessary another option could then be used to override the default
address.
So, as I see it, this is not a problem that you, as a user of the
libcurl API, should have to bother with. I mean, finding the "correct"
address for the port command might not be a trivial task even if you
successfully find all the addresses of the machine. Which one should you
choose?
What do you think?
/m
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.