菜鸟教程小白 发表于 2022-12-12 14:41:21

ios - 在 iOS 中绑定(bind)蜂窝和 Wi-Fi 连接


                                            <p><p>我想结合 wi-fi 和蜂窝网络接口(interface)来增加我的一个 iOS 应用程序中视频上传的带宽。例如,如果我使用 500KBPS 的 3G 连接和 1MBPS 的 WIFI,加起来应该有 1.5MBPS。</p>

<p>到目前为止,我能够列出此处提到的网络接口(interface)的名称:<a href="https://stackoverflow.com/questions/13279220/how-do-i-get-the-currently-connected-network-interface-name-using-cocoa-or-found/13279757#13279757" rel="noreferrer noopener nofollow">How do I get the currently connected network interface name using Cocoa or Foundation?</a> .</p>

<p>例如,“Dejero Live+ 移动应用”能够做到这一点:<a href="https://itunes.apple.com/ca/app/dejero-live+-mobile-app/id517063387" rel="noreferrer noopener nofollow">https://itunes.apple.com/ca/app/dejero-live+-mobile-app/id517063387</a> .</p>

<p>我还浏览了为 Android 指定的论坛:<a href="https://sites.google.com/site/lotuseaterarpit/news/3g4gwififorandroidconcurrently" rel="noreferrer noopener nofollow">https://sites.google.com/site/lotuseaterarpit/news/3g4gwififorandroidconcurrently</a> </p>

<p>也经历过这个<a href="https://stackoverflow.com/questions/20061655/simultaneous-use-of-cellular-and-wifi-ad-hoc-in-ios-7" rel="noreferrer noopener nofollow">https://stackoverflow.com/questions/20061655/simultaneous-use-of-cellular-and-wifi-ad-hoc-in-ios-7</a>也一样,但不明白需要做什么。</p>

<p>请建议我们如何在 iOS 中进行操作?任何信息都会有所帮助。</p>

<p>谢谢,
湿婆。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>你当然<strong>可以</strong>!</p>

<ol>
<li>您应该使用 nativeC 代码。</li>
<li>您应该使用 bind() 调用为每个<strong>接口(interface)</strong>指定 IP 地址。</li>
<li>由于 (2),您应该创建很多套接字。</li>
<li>当您收到可达性通知时,您应该创建新的套接字并垃圾收集旧的套接字。</li>
<li>您应该在每次网络条件发生变化时枚举当前接口(interface)。</li>
</ol>

<p>您可以在我的要点中找到一些见解:
<a href="https://gist.github.com/avesus/fdb465b60a4f5204845c" rel="noreferrer noopener nofollow">https://gist.github.com/avesus/fdb465b60a4f5204845c</a> </p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 在 iOS 中绑定(bind)蜂窝和 Wi-Fi 连接,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/29118733/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/29118733/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 在 iOS 中绑定(bind)蜂窝和 Wi-Fi 连接