January 2010
Beginner to intermediate
576 pages
14h 57m
English
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 ...