Platform SDK: DirectX |
A DirectPlay session is a communications channel between two or more applications or instances of an application.
Note When using some connection types, it is possible for multiple application instances on a single computer to be part of a session. For example, up to four players can play the Memory sample on a single computer using an IPX or TCP/IP connection. Most often, however, a session involves separate computers. For the sake of simplicity, the following discussion refers to each participant in a session as a "computer".
A computer can become part of a session in one of two ways: it can enumerate all the existing sessions on a network and join one of them, or it can create a new session and wait for other computers to join it. Once the application is part of a session, it can create a player and exchange messages with all the other players in the session.
Each session has one computer designated as the host. The host is the owner of the session and is the only computer that can change the session's properties.
The following diagram illustrates the DirectPlay session model:
DirectPlay provides the following session management methods: