views:

54

answers:

1

a friend of mine is trying to create a network traffic compression engine for iphone .. the solution will have a server component likely hosted by the service provider / and will require a client side component that talks to the server ... for this he would need to build a networking client on iphone .. is there a legal way to write networking client on iphone ???

A: 

That depends on what level of access the application needs. If you want something that is always running and can be leveraged by other applications then there's no way - there are no background processes and no kernel extensions. If you need raw access to the networking devices in /dev then no - that's sandboxed off. If you can use CFNetwork then you'll be fine - that lets you create an arbitrary application-layer protocol on top of BSD sockets and TCP/IP at the transport layer.

Graham Lee
@graham .. dot on . i was looking for something that would be accessible for all the apps that are running .. more like kernel extension ... 'cause the client will have to proxy all network traffic to the phone to handle the compression .. there is no wrk arnd eh?
Zun
@zun no workaround. If you control the network config then you can impose a route via a gateway running the compressed protocol, but you don't (I expect) control the mobile network operators.
Graham Lee
@zun: There is no way to do this on a non-jailbroken iPhone. CFNetwork is a practical lowest level to get to, networking-wise, on the iPhone (you can go to BSD sockets, but then you lose some of the iPhone functionality, like bringing up the wireless connection if it has idled). Any application your friend would write would be contained within a sandbox and be unable to affect any other (again, unless the iPhone is jailbroken).
Brad Larson