Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

arnieterm

macrumors regular
Original poster
Aug 28, 2008
201
0
How can we check that whatever network request we send goes through internet connection available over carreir or through wi-fi. I would like to know about the priority order of sending request by Iphone OS when both kind of network are available. My problem is not to detect which network is available because that can be done via the code snippet in "Reachability" sample
Thanks
Arnieterm
 
How can we check that whatever network request we send goes through internet connection available over carreir or through wi-fi. I would like to know about the priority order of sending request by Iphone OS when both kind of network are available. My problem is not to detect which network is available because that can be done via the code snippet in "Reachability" sample
Thanks
Arnieterm

Sounds like you want to force some data over carrier, or over wifi, no?

I'm not sure why you would want to muck around with that - it seems like a good idea to have the iPhone/user decide that. You don't know the networking environment the user is in. If it is a bandwidth issue, test for available bandwidth, rather than available channel.
 
I think I am not fully explained my point. My problem is that I have to detect a device with wifi in my iphone's local wifi network and if the detection is successful then send some json request to that device. If the search is not successful then send http request to a remote web service.
Thanks
Arnieterm
 
A particular device. It is a sercomm router with embedded linux. The device has an application running on it. That app communicates with tcp/ip using json request/response.
Currently my iphone has only wifi configured with no carrier [internet connection]. Whatever network request [http/tcp|ip] goes through wifi to a switch and that switch is connected to a local network that forwards the request based on its type. So this development setup does not actually represent the production setup where both iphone and linux device are on wifi. Also using NSStream classes I am successfully able to send and receive request to that linux device. The only thing that is bothering me is what problems/issues my iphone application will face when run under production setup.
In my iphone application, I have to first search that device in local wifi. If available then the communication with that device begins otherwise the iphone application will send request to a remote web service
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.