【问题标题】:NsurlConnections with IPv6 getaddrinfoNsurlConnections 与 IPv6 getaddrinfo
【发布时间】:2016-07-14 06:52:52
【问题描述】:

使用 NsurlConnections 开发应用程序。如何支持 ipV6 标准网络 API。

https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html

在此处阅读此文档无法了解如何使用此 getaddrinfo 方法。如何在应用程序中使用此代码。究竟该做什么以及如何在 NsurlConnections 中实现 IPv6。帮我!!!!提前谢谢....

【问题讨论】:

  • NSURLConnection 已弃用。你应该改用 NSURLSession。
  • IPv4 和 IPV6 都应该支持 nsurlconnection...怎么可能
  • 您使用的是 IP 地址文字吗?如果是这样,需要将 IPV4 文字翻译成 IPV6

标签: objective-c iphone xcode nsurlconnection ipv6


【解决方案1】:

如果您使用更高级别的 API,它们应该可以正常工作,并根据需要合成地址。你不应该使用getaddrinfo

【讨论】:

    猜你喜欢
    • 2011-08-22
    • 2012-02-03
    • 1970-01-01
    • 2018-02-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-16
    • 2012-06-01
    相关资源
    最近更新 更多