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

+2


source to share


2 answers


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.



+2


source


+3


source







All Articles