Port in DirectPlay ?

Started by
6 comments, last by EonStrife 18 years ago
Hi, I'm making a simple online game, and I use Sobeit Void's tutorial as reference. I wonder, what Port does DirectPlay use ? (So I can configure Firewall correctly). Here's a snippet code of Sobeit's tutorial :

    Address[0].guidDataType = DPAID_ServiceProvider;
    Address[0].dwDataSize   = sizeof(GUID);
    Address[0].lpData       = (LPVOID)&DPSPGUID_TCPIP;  // TCP ID

    Address[1].guidDataType = DPAID_INet;
    Address[1].dwDataSize   = lstrlen(IP_address)+1;
    Address[1].lpData       = IP_address;

Advertisement
From what I understand, it doesn't use any specific port. It can't use restricted ports(ports used for other specific things) but can otherwise use any open port. If I remember correctly, the only requirement as far as this goes is that the server and client must be connected on the same port on both computers, but I could be wrong on that. Anyway, hope that helps.

-AJ
V/R,-AJThere are 10 kinds of people in the world: Those who understand binary and those who don't...
well, thanks...This makes DirectPlay...A bit insecure ?
Depending on the version DirectPlay use different ranges of ports and assign them more or less random to your application.

You can find a list there: http://support.microsoft.com/kb/240429/EN-US/

This is one of many reasons why you should not use DirectPlay anymore. If you want to build a multiplayer game use Winsock or a third party library that use Winsock.
Alright, thanks :)
Guys, it seems that I can't connect the client to server. Before that, when we tested it in intranet(LAN), it worked. However, when we test it on Internet now, it doesn't.

The server used Leased Line connection(they use "tower" to connect to ISP, the speed is 64k, IIRC). Its IP Addresss is 202.xx.xx.xx. From what the ISP told us, they have already disabled firewall.

As for the client, we use modem dialup, the IP Address is 202.xx.xx.xx too. (different ISP)

However, we could connect to the server, if we use internet connection provided by the same ISP.

So, what should I do ? Do I have to change the connection configuration of DirectPlay ?

(Note: I use code from Sobeit's tutorial)
Ah, it already works. It's the ISP which is faulty. After they tinkered the internet connection configuration, it works.
Sorry for bothering you guys.
Uh, I'm looking for DirectPlay 8 tutorial...
For unknown reasons, my client is unable to connect to server, if I use my client program in cybercafe or connecting it to internet through CDMA mobile phone. It's possible that the NAT in client PC/network which causes it...

This topic is closed to new replies.

Advertisement