I'm thinking about an application for iPhone but it'll need a socket connection with the server. I was wondering:

1 - webApp - as it's easier to develop it but since Java and Flash are not available on MobileSafari - looks like I have a problem

2 - nativeApp - is socket connection available in nativeApps? any links to documentation / whatever?

there's also a side-product question. Is it possible to establish a hidden connection between webapp and nativeApp? I'd like user to use webapp only and I'd like him to have a native app which would communicate with the server and update webapp with the latest data. But I'm probably asking for too much?