Re: how to use: struct sockaddr
Re: how to use: struct sockaddr
- Subject: Re: how to use: struct sockaddr
- From: Quinn <email@hidden>
- Date: Tue, 1 Feb 2005 06:54:07 +0000
At 18:18 -0800 16/12/04, Justin Walker wrote:
Just a side note (this part of the thread slipped past while I
wasn't watching):
gethostbyname() is going to work in "simple" environments, but you
should really be using "getaddrinfo()" or "gethostinfo()", depending
on your needs.
Good advice indeed. However, if you're already knee deep in CF code,
you can use CFHost to get all of the IPv[46] addresses for a given
DNS name. This allows you to handle IPv4 and IPv6 transparently,
which is pretty cool.
The end result of the CFHost process is an CFArray of CFDatas, each
of which contains a (struct sockaddr). Cool huh?
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden