IOS-how do I parse the IP address (sockaddr * Resolution) from Boujour )?, Boujoursockaddr
1. PrefaceSome netizens left me a message saying: How do I parse the IP address from the array parsed by Boujour? Because the addresses after the Boujour Parsing is an array, how can we parse the IP addresses we need from this array? For more information about how to use Boujour, refer to an article I wrote earlier: How to Use iOS-Apple zero-configuration Network Protocol Bonjour?2. Convert the data in the arraySockaddr
. After Boujour is parsed, the following proxy method will be entered:
In this method, I throw a notification and transfer the data.
2. After listening for notifications, we began to convert the data in the array to sockaddr.
3. How to convert socketaddr to a string
After completing the above two steps, we will pass out the IP address through boujour and resolve it successfully. What should we do afterwards.
Author: Clear Saup
Source: http://www.cnblogs.com/qingche/
The copyright of this article is shared by the author and the blog. You are welcome to repost it, but you must keep this statement and provide a connection to the original article on the article page.