IPhone. Creating a binary data stream using an HTTP server
How do I set the input stream over HTTP for iPhone? My project is to gradually pull binary data from an HTTP server to an iPhone. The pattern is to pull some data - this is a scientific application - analyze it for a while, pull in more data. Rin, and I repeat.
This project is a port of a Java desktop application that relies on InputStream and it is the readInt, readString, etc. methods to do it.
Cheers, Doug
source to share
If you want an API that mirrors the Java input stream more directly, you can look at CFNetwork based on C. However, Daniel's suggestion to use a URL loading system (NSURLRequest, NSURLConnection, etc.) is preferable because it uses Objective-C and very easy to use asynchronously. This makes the old stdio.h functions much easier to execute than java.io does, and is worth understanding.
source to share
You can use NSURLRequest / NSURLMutableRequest along with NSURLConnection to achieve this, here are some links http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSURLRequest_Class/Reference/Reference.html , http : //developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/Reference/Reference.html
source to share