Terminating a Client/Server Session

DirectPlay

 
Microsoft DirectX 9.0 SDK Update (Summer 2003)

Terminating a Client/Server Session


To terminate a client/server session, the server calls IDirectPlay8Server::Close. There is no host migration in a client/server session, so this method terminates all connections and closes the session. The clients are notified of the session end by a DPN_MSGID_TERMINATE_SESSION message.

The server will then receive a DPN_MSGID_DESTROY_PLAYER message for each player, including itself. IDirectPlay8Server::Close is synchronous, and will not return until all the DPN_MSGID_DESTROY_PLAYER messages have been processed. When IDirectPlay8Server::Close has returned, you can safely shut down the server application.


© 2003 Microsoft Corporation. All rights reserved.