Is the CFStream classes IPV6 compliant? I am using CFStreamCreatePairWithSocketToHost to connect to a socket instead of low level socket api's
CFStreamCreatePairWithSocketToHost api belongs to CoreFoundation and i do not see any section in Supporting IPv6 DNS64/NAT64 Networks" in apple documentation which says this particular api is IPv6 compliant.
Apple says to use High Level Frameworks such as
WebKit. This framework provides a set of classes for displaying web content in windows, and implements browser features such as following links, managing a back-forward list, and managing a history of pages recently visited. WebKit simplifies the complicated process of loading webpages—that is, asynchronously requesting web content from an HTTP server where the response may arrive incrementally, in random order, or partially due to network errors. For more information, see WebKit Framework Reference.
Cocoa URL loading system. This system is the easiest way to send and receive data over the network without providing an explicit IP address. Data is sent and received using one of several classes—such as NSURLSession, NSURLRequest, and NSURLConnection—that work with NSURL objects. NSURL objects let your app manipulate URLs and the resources they reference. Create an NSURL object by calling the initWithString: method and passing it a URL specifier. Call the checkResourceIsReachableAndReturnError: method of the NSURL class to check the reachability of a host. For more information, see URL Session Programming Guide.
CFNetwork. This Core Services framework provides a library of abstractions for network protocols, which makes it easy to perform a variety of network tasks such as working with BSD sockets, resolving DNS hosts, and working with HTTP/HTTPS. To target a host without an explicit IP address, call the CFHostCreateWithName method. To open a pair of TCP sockets to the host, call the CFStreamCreatePairWithSocketToCFHost method. For more information, see CFNetwork Concepts in CFNetwork Programming Guide.
First of all, all built-in networking APIs are "IPv6 compliant", as in you can make IPv6 connections with them. For example, you can make IPv6 sockets with the low-level socket APIs.
I think your question is whether you can use CFStreamCreatePairWithSocketToHost()
to connect to an IPv4 address literal on an IPv6-only network. The answer is Yes, it will work on iOS 9.2+.