Re: waiting for IPv4 addresses over bluetooth
Re: waiting for IPv4 addresses over bluetooth
- Subject: Re: waiting for IPv4 addresses over bluetooth
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Sat, 31 May 2014 10:47:54 -0700
On 31 May 2014, at 05:52, justin webster <email@hidden> wrote:
> So is anyone aware if this is a known issue with bluetooth between Mac and iOS?
Hmmm. When I first read you're email I thought you were doing peer-to-peer Bluetooth. But we don't support peer-to-peer Bluetooth between Mac and iOS, so now I suspect you're using Personal Hotspot. Is that right?
Regardless, the reason why you get IPv6 before IPv4 is that IPv6 self-assigned addresses do not require any magic; they always work immediately after the link comes up. In contrast, IPv4 will first make a DHCP request. If that succeeds, it'll use that address, and if that fails it'll use self-assigned. In both cases it takes time for the address to become available.
What are you doing with this IP address anyway? If you're connecting to the server, you should use a connect-from-service (-[NSNetService getInputStream:outputStream:]) or connect-by-name [1] API. These will do the right in all cases.
If you're not connecting to the service, what are you doing with the address. IP addresses, whether v4 or v6, are remarkably un-useful in most cases (-:
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
[1] QA1652 "Using NSStreams For A TCP Connection Without NSHost"
<https://developer.apple.com/library/ios/#qa/qa1652/_index.html>
_______________________________________________
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