What's New in DirectPlay 6.0?
This section discusses new features in Microsoft® DirectPlay® 6.0. For the most recent updates, including new features, additional samples, and further technical information, consult the Microsoft DirectX® Web site at http://www.microsoft.com/DirectX/.
DirectPlay 6.0 has a few new interfaces, IDirectPlay4, IDirectPlay4A, IDirectPlayLobby3, and IDirectPlayLobby3A. IDirectPlay4 inherits directly from IDirectPlay3, and IDirectPlayLobby3 inherits directly from IDirectPlayLobby2. The IDirectPlay4A and IDirectPlayLobby3A are the ANSI versions of the interfaces, while IDirectPlay4 and IDirectPlayLobby3 are the Unicode versions of the interfaces. and by default behaves as IDirectPlay3. All new functionality is enabled through new methods or flags.
DirectPlay 6.0 supports the following new features and methods:
- Guaranteed Messaging: DirectPlay 5.0 only supported guaranteed messaging when the service provider implemented it. In a practical sense, this meant that guaranteed messaging was available only on TCP/IP. In DirectPlay 6.0, the DirectPlay Protocol enables guaranteed messaging on all service providers regardless of whether the provider inherently support guaranteed messaging. This makes true guaranteed messaging available on IPX, modem, and serial service providers. The DirectPlay Protocol is built upon the nonguaranteed messaging of the service provider.
The DirectPlay Protocol can also be used as a substitute for the guaranteed protocol implemented by the service provider. This improves the efficiency of service providers, such as TCP/IP, because the DirectPlay Protocol is designed for real-time gaming while TCP is not. For example:
- Guaranteed messages are not serialized; they do not wait for each to be acknowledged before sending the next one. Several messages can be outstanding while waiting for acknowledgement. This improves the overall throughput of messages.
- Message prioritization is provided. Higher priority messages are sent before lower priority messages. Lower priority messages only use idle bandwidth. A large, lower priority message that spans many packets will not block a higher priority message.
- Fully dynamic reporting of latency is supported.
See IDirectPlay4::SendEx, IDirectPlay4::Send, and DirectPlay Protocol for more information.
- Asynchronous Messaging: New methods have been added to DirectPlay 6.0 to support asynchronous messaging. DirectPlay 5.0 supported only synchronous messaging. This meant that an application was blocked in the IDirectPlay4::Send method until the send was complete. For a guaranteed send on TCP/IP, this could take some time on a slow connection, and would take even more time for guaranteed sends to a group of players.
In DirectPlay 6.0, the SendEx function call returns immediately, and the application is notified of the success or failure by means of a message posted to the receive queue. The application also has the ability to cancel messages. In addition, the service provider interface has been updated to allow service providers to implement optimized asynchronous messaging, as well.
See Asynchronous Messaging, SendEx, CancelMessage, and GetMessageQueue for more information.
- Message Throttling: DirectPlay 5.0 sent messages as fast as the outbound bandwidth of the computer allowed. DirectPlay 6.0 throttles the rate at which messages are sent to make sure that it does not overload the target computer or exceed the outbound bandwidth of the sending computer, thus introducing latency. A send queue keeps a list of pending messages. The application can use the status of the send queue to regulate how much data it sends.
For example, a computer attached to the Internet through an ISDN line can send data much faster than a computer connected by means of a 28.8 modem can receive data. As a result, messages are queued on the receiving computer's Internet service provider (ISP) with no indication to the sending computer that this is a problem. With throttling, the ISDN computer only puts data onto the network as fast as the 28.8-modem computer can receive it. This gives the sending application the chance to see that messages in the send queue are backing up and to cancel some of them or decrease the rate of sending data.
See SendEx, CancelMessage, and GetMessageQueue for more information.
- Firewall Support for TCP/IP: DirectPlay 6.0 uses a range of port numbers to make it easier to configure firewalls. This works with all clients behind firewalls.
The firewall support is completely transparent to the developer and to the end user. The firewall administrator needs to configure the firewall to allow DirectPlay packets to pass through.
See Firewall Support in DirectPlay 6 for more information.
- Lobby Improvements: DirectPlay 6.0 notifies the lobby when the host of a session has migrated. This makes it easier for lobby systems to track the host of a game and thus allow players to join games in progress.
The DirectPlay lobby messages are seamlessly integrated with the lobby provider interface so that external lobby clients do not have to re-route messages to the server. Connect and ConnectEx have a maximum limit on the timeout (1 minute). You no longer have to wait 2.5 minutes on the Internet to realize your game did not connect. Connect and ConnectEx are asynchronous, so you can cancel at anytime.
See DPLMSG_NEWSESSIONHOST, Connect and ConnectEx for more information.
- Security: DirectPlay 6.0 provides security for peer-to-peer sessions (as long as the host is on a secure server). Previously only client-server sessions could be secure. DirectPlay 6.0 also supports sending secure messages to a group.
See DPSESSIONDESC2 for more information.
- Application Registration: Methods to register and unregister lobby-aware applications are now part of the DirectPlay dynamic-link libraries (DLLs), rather than part of the DirectX foundation setup routines.
See IDirectPlayLobby3::RegisterApplication and IDirectPlayLobby3::UnregisterApplication for more information.
- Improved Localization Support: Registry entries for DirectPlay service providers, lobby providers, and lobby-aware applications are now better able to support localization through the use of separate ANSI descriptions and Unicode descriptions. This allows applications that only support single-byte characters to display properly localized ANSI descriptions, while applications that support Unicode or multi-byte character sets can obtain a better description.
The biggest improvement can be seen in English language applications being run on Far East versions of Windowsrather than receiving a multi-byte description displayed as garbage, users now receive a single-byte description that is correct.
See Service Providers, IDirectPlayLobby3::RegisterApplication, IDirectPlay4::EnumConnections, IDirectPlayLobby3::EnumLocalApplications, and DirectPlayEnumerate for more information.
- Improved Keep-alive Support: Applications can implement their own keep-alives so that the server player can remove dead clients. The host or server can destroy remote players.
See Service Providers and IDirectPlay4::DestroyPlayer for more information.
- Private Service Providers: Some service providers do not want to be presented to the user by the application. These are cases where the service provider only works when launched by a lobby client. DirectPlay 6.0 supplies a flag for these service providers to be private. These service providers can only be referenced when launched by a lobby, or if the application knows the globally unique identifier (GUID). Private service providers will not be listed by IDirectPlay4::EnumConnections.
See Service Providers and IDirectPlay4::EnumConnections for more information.
- Lobby Can Connect to an Application That Is Already Running - A new method on the IDirectPlayLobby3 interface enables an application to go into a wait mode. When in wait mode, a lobby client that uses RunApplication will not launch a new instance of the application, but will send the connection settings directly to the application already running in wait mode.
See WaitForConnectionSettings for more information.
DirectPlay 6.0 supports the following new methods, structures, system messages, and lobby messages:
- IDirectPlay4::SendEx
- IDirectPlay4::CancelMessage
- IDirectPlay4::CancelPriority
- IDirectPlay4::GetMessageQueue
- IDirectPlay4::GetGroupOwner
- IDirectPlay4::SetGroupOwner
- IDirectPlayLobby3::ConnectEx
- IDirectPlayLobby3::RegisterApplication
- IDirectPlayLobby3::UnregisterApplication
- IDirectPlayLobby3::WaitForConnectionSettings
- DPAPPLICATIONDESC
- DPMSG_SENDCOMPLETE
- DPMSG_SETGROUPOWNER
- DPLMSG_NEWSESSIONHOST
DirectPlay 6.0 also supports new functionality for existing DirectPlay 5.0 methods, structures, system messages, and callback functions:
- IDirectPlay4::CreateGroup
- IDirectPlay4::CreateGroupInGroup
- IDirectPlay4::DestroyPlayer
- IDirectPlay4::EnumConnections
- IDirectPlay4::EnumGroupPlayers
- IDirectPlay4::EnumGroups
- IDirectPlay4::EnumGroupsInGroup
- IDirectPlay4::GetPlayerAddress
- IDirectPlay4::Send
- IDirectPlayLobby3::Connect
- IDirectPlayLobby3::EnumLocalApplications
- DPSESSIONDESC2
- DPMSG_CREATEPLAYERORGROUP
- DPMSG_DESTROYPLAYERORGROUP
- EnumPlayersCallback2
Top of Page
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.