O'Reilly logo

More iPhone 3 Development: Tackling iPhone SDK 3 by Jeff LaMarche, Dave Mark

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

Chapter 9. Online Play: Bonjour and Network Streams

In the previous chapter, you saw how easy it is to create a networked application using GameKit. GameKit is cool, but currently it only supports online play using Bluetooth. If you want your networked programs to play on first-generation iPhones and iPod touches, or if you want to let people play over their local Wi-Fi connection or the Internet, you need to go beyond GameKit. In this chapter, we're going to do just that.

We'll take our TicTacToe project from Chapter 8 and add online play to it. We'll use Bonjour to let you find other players on your local network, and then create objects using CFNetwork, Apple's low-level networking framework, and the Berkeley sockets API to listen on the network ...

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