|
-
Feb 24th, 2010, 05:57 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] TCP/IP Ports?
I have made a few TCP/IP based programs in the past. One of the requirements my program had was to open up the required port in the user's router.
How does MSN / AIM / Google Talk etc.. communicate with a server without making me open the required port in my router? Does it not need a new port to be opened? If so, how do I do the same?
-
Feb 25th, 2010, 07:42 AM
#2
Re: TCP/IP Ports?
Those services also require an open port.
-
Mar 8th, 2010, 05:42 PM
#3
Thread Starter
Frenzied Member
Re: TCP/IP Ports?
What ports do they use? Are the ports already open, or does the program open the port? Since I never confirmed any change to my router...
-
Mar 16th, 2010, 10:46 PM
#4
Re: TCP/IP Ports?
Outbound connections (initiated by the client) don't require an open port because outgoing traffic is usually not caught by the router. Listening for incoming connections from behind a router requires that traffic on a port or port range is forwarded from the router to the target machine (the server). Don't bump your threads.
-
Mar 17th, 2010, 03:21 PM
#5
Re: TCP/IP Ports?
In your case you probably have a program acting as a server, behind your NAT router.
Those IM services you list have already taken care of exposing their servers to the outside world. So you'd need to do the same, typically by configuring your router to map incoming connections on port X to computer Y port Z on your private (inside) network. X and Z can be the same port, but usually they don't have to be. Outside users will always connect to X though, since this is the exposed port.
If you are using a recent OS (XP or later) there are system components that allow your program to create and delete such mappings. It depends on whether your router has UPnP, has it turned on, and the level of UPnP support it offers.
See [VB6] PortMapper - UPnP NAT Traversal Class which I posted a while back. You could drop the Class into your projects and use it as is, or read it as an example of how to use the upnp.dll directly yourself.
-
Mar 17th, 2010, 07:37 PM
#6
Thread Starter
Frenzied Member
Re: TCP/IP Ports?
Thank you - this thread is resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|