Managing a Client/Server Session

DirectPlay

 
Microsoft DirectX 9.0 SDK Update (Summer 2003)

Managing a Client/Server Session


As host, the server is responsible for managing the course of the session. The details will depend on how the application is designed, but a session host's duties include, at a minimum:

  • Managing the list of session members and their network addresses. Microsoft® DirectPlay® handles some of this task, but server applications typically need to manage more player data than is provided by DirectPlay.
  • Deciding whether a new user is allowed to join the session.
  • Providing new users with the current game state.

When a player attempts to join a session, the host receives a DPN_MSGID_INDICATE_CONNECT message. To accept the player into the session, return S_OK. Returning any other value rejects the connection request. In either case, the player will receive a DPN_MSGID_CONNECT_COMPLETE message that contains your response.

The host can remove a player from the session by calling IDirectPlay8Server::DestroyClient.


© 2003 Microsoft Corporation. All rights reserved.