Skip to Main Content
Professional iPhone® and iPad™ Application Development
book

Professional iPhone® and iPad™ Application Development

by Gene Backlin
November 2010
Intermediate to advanced content levelIntermediate to advanced
600 pages
14h 21m
English
Wrox
Content preview from Professional iPhone® and iPad™ Application Development

Chapter 7. Networking Concepts

WHAT'S IN THIS CHAPTER?

  • Publishing network services

  • Browsing available network services

  • Sending data objects between peer devices

  • Sending voice between peer devices

This chapter explains how to register and discover network services, and describes the communication process between devices using the OS's built in connection software, Bonjour. Two foundation classes are defined for managing Bonjour network services:

  • NSNetService — An actual network service

  • NSNetServiceBrowser — A browser for the related network service

The process used by these two foundation classes are defined by three basic operations:

  • Registration (server side) — NSNetService

  • Browsing (client-side discovery of domains and services) — NSNetServiceBrowser

  • Resolution (client side) — NSNetService

The first example application in this chapter demonstrates publishing by the server, and browsing by the client to discover domains and services. The results of the process will be listed in a Table view on the device, and the server application is a desktop-based application.

When there is a requirement for devices to communicate with each other, iOS 4 has a framework, GameKit, that insulates the details in two classes:

  • GKSession — For networking handling

  • GKPeerPickerController — Provides a UI for connecting

The process used by these two foundation classes are defined by three basic operations:

  • Initialization of the GKSession

  • Connection between the users

  • Data exchange between the peers

The UI for connecting between ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional Visual Studio® 2010

Professional Visual Studio® 2010

Nick Randolph, David Gardner, Michael Minutillo, Chris Anderson
Navigating the Metaverse

Navigating the Metaverse

Cathy Hackl, Dirk Lueth, Tommaso Di Bartolo, John Arkontaky, Yat Siu
Navigating the Metaverse

Navigating the Metaverse

Cathy Hackl, Dirk Lueth, Tommaso Di Bartolo

Publisher Resources

ISBN: 9780470878194Purchase book