• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSHost and the IP addresses ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSHost and the IP addresses ...


  • Subject: Re: NSHost and the IP addresses ...
  • From: Guido Neitzer <email@hidden>
  • Date: Thu, 27 Jun 2002 13:44:46 +0200 (Europe/Berlin)

Malte Tancred wrote:

You said you needed the local address to create a port command for an
ftp client. Why not ask the control socket (I suppose you have one?)
for it's local name?

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.


cug
_______________________________________________
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.

  • Prev by Date: Re: Quartz/memory benchmarks...
  • Next by Date: Re: NSHost and the IP addresses ...
  • Previous by thread: Re: NSHost and the IP addresses ...
  • Next by thread: Re: NSHost and the IP addresses ...
  • Index(es):
    • Date
    • Thread