Microsoft DirectX 9.0 SDK Update (Summer 2003) |
Source: (SDK root)\Samples\C++\DirectPlay\ChatPeer
Executable: (SDK root)\Samples\C++\DirectPlay\Bin
Enter the player's name and choose a connection type. You can choose "Wait for Lobby Connection" or choose a service provider. Use the Multiplayer Games dialog box to either search for an active game to join or to start a new game. When you join or start a game, you can begin immediately. Other players can join the game at any time. If host migration is on, the host player can also leave at any time, because Microsoft® DirectPlay® will automatically migrate the host session to another player.
The ChatPeer sample is very similar in form to the SimplePeer sample. The ChatPeer differs by letting clients send text string to all players connected to the session. For detailed programming notes, see the Programming Notes section of the SimplePeer sample.
When Send is pressed, the SendChatMessage function does the following: