Chapter 9

Testing and Manipulating Network Traffic


  • Observing network traffic
  • Manipulating network traffic with proxies
  • Simulating real-world network conditions


The code downloads for this chapter are found at on the Download Code tab. The code is in the Chapter 9 download and individually named according to the names throughout the chapter.

You make mistakes. This is an inescapable fact of life that everybody deals with every day. Because you and every other person in the world make mistakes, the software you write also has mistakes. Because of this it is essential to diagnose software behavior, find the mistakes, correct them, and try to avoid them in the future.

When writing networked applications, many layers of software and hardware are in between each component of the system. It is often necessary to observe the interaction between these components to get a complete and accurate picture of what happens at a higher level, so you can better discover any existing mistakes.

This chapter describes methods to observe these network interactions, manipulate them, and simulate real-world conditions in them. Observing network interactions gives you an accurate picture of which requests leave the device and what data is received. Manipulating network traffic allows you ...

Get Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad now with O’Reilly online learning.

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