09-05-2001, 05:25 AM
Using Winsock requires selecting LocalPort and RemotePort etc. I have used the port 1001 as given in the examples as tcpServer.LocalPort = 1001, the question is, where does 1001 come from, what other ports are available, and why use certain ports?
Any points to documents explaining this would be welcomed.
09-05-2001, 07:10 AM
you can use any ports but not the ports are being used.
such like 80. it's used to HTTP transmissions.
When you computer is connecting on the net, there are 65535
ports can be used. Don't worry about this . The example just
shows the basic functions.
09-05-2001, 07:35 AM
Thanks boy... but how do you know which ports are in use and if you are connected to a LAN how many ports do you have then?
09-05-2001, 07:44 AM
Well, if you wanna know which port is for what, go to google and type port list, i think you'll find a full list.
09-05-2001, 08:13 AM
Most ports above 1000 will be available, however, to be even safer, use
ports above 10000.
I think therefore I am... sometimes right. images/icons/wink.gif
09-05-2001, 08:38 AM
There are two sets of ports - TCP and UDP. Each has 65535 making over 120,000 ports in all. The first 1023 ports of each set are used by your system. Anything above that is used by apps like yours that need internet connectivity.
You can open a port merely by calling the
"Dammit Smithers, this is brain surgery not rocket science!! Now hand me that ice cream scoop..."
09-05-2001, 10:47 AM
ports from 1-8000 are 'officially' used, ie there is a description to their use ie 110 is pop3 109 is pop2 and 108 is pop1 (I think). Anything above 8000 should be safe to use.(most types of applications are covered using the 8000 ports).
One to watch out for is 8080, which is usually used as a secondary Http Port.
As for UDP, Im not sure, mainly used for games, where dropped packets are ignored, and dont usually matter.
09-06-2001, 02:33 AM
I found some stuff on the Internet yesterday explaining the MS Winsock component and it mentioned that various ports are used for various protocols, i.e. 13 is for Date and Time of the server etc.
The responses I've received on this post have given me a lot of ideas to look into. A bit more further reading is required on my behalf then hopefully the penny will drop.