连接到adhoc wifi时使用3g上网(使用专用API) [英] use 3g for internet when connected to adhoc wifi (using private API's)

查看:51
本文介绍了连接到adhoc wifi时使用3g上网(使用专用API)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先, 我正在寻找使用私有API的资源. 这是一个企业应用程序,永远不会去应用程序商店 我需要从用户手中获取尽可能多的配置.

First and foremost, I am looking for a resource to use Private API's. this is an enterprise application and will never go to the app store I need to take as much configuration out of the users hands as possible.

话说回来,我有一个设备,可以将ipad连接到该设备并通过该设备提供的即席wifi网络与之通信. ipad连接到该设备,并通过套接字连接将原始数据发送到该设备.我还需要连接到互联网进行数据同步.

That being said, I have a device that an ipad will be connected to and communicate with via an adhoc wifi network supplied by the device. the ipad connects to this device and sends raw data to it via socket connections. I also need to connect to the internet for data syncing.

80%的时间中,ipad将连接到此adhoc wifi设备. ipad上的管理软件不允许用户调整wifi设置,因此我试图确保在不限制服务器同步的情况下连接到设备.我知道我可以使用apples Reachability类确定连接,这不是我想要的.我需要同时使用3g和wifi.

80% of the time, the ipad will be connected to this adhoc wifi device. Management software on the ipad does not allow the user to adjust wifi settings so I am trying to make sure I am connected to my device without limiting my server syncing. I know I can determine the connection using apples Reachability class, this is not what i am looking for. I need to use BOTH 3g AND wifi.

有没有办法在代码中强制执行此操作?还是我可以查看私有API的资源以找到一种方法?

Is there a way to enforce this in code? Or is there a resource for the private API's that I can look at to find a way?

这将是在iOS 5中,最可取的方法是通过某些私有api方法将我的http请求路由以使用3G,并让套接字请求使用wifi到adhoc设备.

This will be in iOS 5 and the most preferable method would be to just route my http requests via some private api method to use 3G and let the socket requests use wifi to the adhoc device.

代码示例非常棒,非常感谢与研究相关的链接/类名.

code samples would be awesome, links / class names to research would be very much appreciated.

再次这不是要进入应用商店,它是企业应用

推荐答案

我发现的解决方法是,将ipad使用的私有IP范围(169.254.xx)中的IP分配给即席设备,然后让ipad确定一个ip.然后查看我是否可以打开与设备的套接字连接(以确定其是否可用),然后打印.

the resolution i found was to assign an ip in the privately assigned ip range the ipad uses (169.254.x.x) to the adhoc device then let the ipad determine an ip. Then see if i can open a socket connection to the device (to determine if its available) and then issue a print.

走这条路,我仍然能够使用3g数据以及通过wifi与设备进行通信.

Going this route, i am still able to use 3g data as well as communicate with the device via wifi.

这篇关于连接到adhoc wifi时使用3g上网(使用专用API)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆