Contents

Introduction to Stream Programming Guide for Cocoa

Explains how to use the Cocoa stream classes to read data from and write data to streams.

Organization of This Document

This document includes the following articles:

Cocoa Streams gives an overview of the Cocoa stream classes, describing architecture, capabilities, and general usage.

Reading From Input Streams explains how to create and prepare a (non-socket) input-stream object. It also describes how to handle stream events generated by all types of NSInputStream objects.

Writing To Output Streams explains how to create and prepare a (non-socket) output-stream object. It also describes how to handle stream events generated by all types of NSOutputStream objects.

Polling Versus Run-Loop Scheduling discusses the relative merits of the two techniques used to avoid blocking when reading and writing to streams. It also illustrates how to poll for stream data using the API of the stream classes.

Handling Stream Errors describes how to handle errors that occur in stream processing.

Setting Up Socket Streams explains how to set up stream objects used to communicate with remote hosts via sockets.

See Also

You may find the following external resources helpful if you are implementing socket-based network streams:

OpenSSL — http://www.openssl.org/

Apache SSL — http://www.apache-ssl.org/

SOCKS — http://tools.ietf.org/html/rfc1928

Next

Copyright © 2004, 2013 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2013-12-16