Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


what is the difference b/w Local & Remote Port?

This topic is 5486 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, Can anyone plz elaborate the difference b/w dwLocalPort & dwRemotePort while creating a direct play peer-peer application. I understand that its a very basic question, but I ''m a newbie, I try to search alot, but couldn''t get much information. What I got, how to use them in HostAddress & DeviceAddress, but what is the exact difference b/w them? Any help in this matter will be highly appriciated & thanx in advance. Regards, Ejaz.

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
I''m not sure about DirectPlay, but looking at it from a sockets point of view, I would say that the port numbers would describe the ports used in the end points of a network connection.

Take a connection where A connects to B - the endpoints are identified by an IP address and a port number. This information is needed by the network layer to know where to direct data up the layers of the protocol stack.

You shouldn''t really need this information because it is represented to you in your application by a socket which you simply use to send and receive data.

From a command prompt (or your console if you are using Linux) type netstat - you will see a list of connections which look something like this:

Proto Local Address Foreign Address State

You can see the local and remote (foreign) IP addresses and port numbers.

Hope this helps

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!