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 ...
Get More iPhone 3 Development: Tackling iPhone SDK 3 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.