Chapter 19. Creating a Client/Server Session

IN THIS CHAPTER

Peer-to-peer sessions can work quite well when you're dealing with a small subset of users. However, when you're looking to maintain a network session with hundreds or even thousands of simultaneous players, you really need a dedicated server. In a peer-to-peer session, all data sent from one peer to the other peers can be duplicated for every peer in the session. For small groups, this isn't prohibitive, but even a small chunk of data can be quite large when it's sent 10,000 times.

DirectPlay includes two other networking classes much like the peer object: the client and the server objects. You can think of each of these as a subset of the functionality that exists in the peer object, considering that the peer object is essentially both a client and a server. In this chapter you will create a client/server application that delves a little deeper into the workings of DirectPlay, including

  • Creating dedicated servers running on particular ports

  • Connecting to these servers using the client interface

  • Tracking player joining and disconnecting

  • Sending game-specific data

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.96.247