ios - AFNetworking 可达性ForLocalWiFi
<p><p>AFNetworking 2 有什么方法可以等效</p>
<pre><code>;
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我查看了 Apple 可访问性代码,我认为这可以完成这项工作。 </p>
<pre><code>- (AFNetworkReachabilityManager*) reachabilityForLocalWifi
{
struct sockaddr_in localWifiAddress;
bzero(&localWifiAddress, sizeof(localWifiAddress));
localWifiAddress.sin_len = sizeof(localWifiAddress);
localWifiAddress.sin_family = AF_INET;
// IN_LINKLOCALNETNUM is defined in <netinet/in.h> as 169.254.0.0.
localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM);
return ;
}
</code></pre></p>
<p style="font-size: 20px;">关于ios - AFNetworking 可达性ForLocalWiFi,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/21684413/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/21684413/
</a>
</p>
页:
[1]