DirectPlay uses UDP when you are using the TCP/IP provider. In fact,
this is one of the primary security concerns we have with DirectPlay
because as a connectionless protocol, it is much easier to attack via a
UDP connection than a TCP/IP one. DPVoice is also a security concern
because it uses UDP. A great deal of care must be taken when writing
code that works with UDP to avoid creating security vulnerabilities, and
a full appreciation of the difficulties of doing this well have only
begun to form in the past few years.
While UDP has advantages as a datagram protocol, particularly for LAN
play with 'twitch' games that tend to send a lot of high-frequency
updates, there have been several commercial games to use TCP (notably
World of Warcraft) instead because it is a more secure
connection-oriented protocol. Peer-to-peer networking also requires
coping with firewall and NATs in ways that are more complicated than
pure client-server models.
The reason DirectPlay was originally created was not based on a need to
make UDP easier to use. It was originally created because at the time
there were dozens of different technologies for doing multi-player
games: serial head-to-head, dial-up modem head-to-head, TCP/IP over
modem, IPX, and this upstart protocol TCP/IP. Since that time, TCP/IP
has become ubiquitous and games can easily assume that it is the one and
only protocol needed. That means a large portion of DirectPlay's
codebase and API is effectively obsolete.
As a deprecated API, DirectPlay is no longer being actively maintained
or enhanced. It also means that some future releases of the OS will
eventually drop support for it. We've already dropped support for older
legacy APIs with the x64 release of Windows, and have been more
aggressive for 64-bit native applications since there is less of an
app-compat concern. For example, 32-bit applications can use Dplay 4 or
8, but 64-bit native applications can only use Dplay 8. No application
can use Dplay 1 on Windows XP x64 Pro. My point here is just that when
we say an API is deprecated, we are discouraging its use to avoid future
app compat issues as well as to promote best practices for developers
and to enhance the stability and security of the platform as a whole.
As for the question as to what we mean by "core Microsoft Windows
networking technologies", there are things available today that we
highly recommend. The Winsock 2.x API on Windows 2000 and higher has
great support for asynchronous communication that is very
high-performance. With XP SP 2 (or the "Advanced Networking Pack" for
XP), we've added a number of enhancements to make NAT traversal,
peer-to-peer communications, and discovery much easier to implement that
build on the basis of our IPv6 work that fully supports existing IPv4
infrastructure. Search the latest MSDN for IPv6, Teredo, PNRP, and P2P
for details.
-Chuck Walbourn
SDE, Windows Gaming & Graphics
Partager