Sign in to follow this  
EonStrife

Port in DirectPlay ?

Recommended Posts

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;

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this