Is it possible to send tcp request using NSURLR开发者_高级运维equest/NSURLConnection to an ip address and associated port from an iphone app, if yes than how? Using NSStream it is possible to establish tcp connection to an ip and port. I am trying to establish connection to a non apple device and using nsstream it works fine but it is not very responsive [may be due to the remote device] so I am looking for NSURLRequest/NSURLResponse way of doing the same thing. Can anybody suggest how to do this [if possible]?
A little googling leads me to this link http://lukassen.wordpress.com/2010/0...-on-iphone-os/ Is it a reason behind my problem with NSStream though I do not get any error Thanks
Arnieterm
No, it is not possible.
CFStream and/or NSStream are the only way to do it, eg:
http://dev.im.ethz.ch/wiki/Socket_communication_on_the_iPhone
or a wrapper around them:
http://code.google.com/p/cocoaasyncsocket/
精彩评论