Microsoft DirectX 8.1 (C++) |
The ChatPeer sample is similar in form to SimplePeer. Once a player hosts or connects to a session, the players can chat with each other by passing text strings.
Source: (SDK root)\Samples\Multimedia\DirectPlay\ChatPeer
Executable: (SDK root)\Samples\Multimedia\DirectPlay\Bin
Enter the player's name and choose a connection type. You can choose either "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. After game has been joined or created, the game begins immediately. Other players can join the game at any time. If host migration is on, the host player can also leave at any time since 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 details, see the "Programming Notes" section of the SimplePeer sample.
When Send is pressed, the SendChatMessage function does the following: