O'Reilly logo

iPhone Applications Tune-Up by Loyal Moses

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Streams

One particular method of asynchronously working with sockets is by using streams, provided by NSStream.

A stream by definition in the programming arena is the serialization of data transmitted between two points. For the purposes of this chapter, we will be discussing streams as they relate to socket programming and network performance rather than the full range of NSStream capabilities, such as reading and writing to files and memory and so on.

Streams provide us with an abstraction layer to read and write data while taking advantage of the benefits of the delegate pattern that Objective-C developers are comfortable with. Essentially, this means wrapping the low-level socket development that might otherwise be needed in a nice little package ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required