Chapter 2. Apple Low-level Networking

In this chapter, we will cover:

  • Retrieving network address information
  • Performing network address resolution
  • Creating an echo server
  • Creating an echo client
  • Creating a server to receive data
  • Creating a client to send data
  • Checking the network status


The primary API behind Apple's low-level networking is the CFNetwork API.

The simplest way to describe CFNetworking is to say that it is an Apple-specific extension to the BSD socket API. The CFNetworking stack is based on and relies on the BSD socket API that was discussed in Chapter 1, BSD Socket Library. It is recommended that the reader understands the concepts discussed in Chapter 1, BSD Socket Library, prior to going through this chapter. While this chapter ...

Get iOS and OS X Network Programming Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.