how to know which port is open
-
hi, I have 2 application. one is opening a port let say 2600 and listening to that port. my 2nd program will tell me that port 2600 is open or not what will be the code for that VB. bye Paritosh
You're second app whas to be told which port to use. The only way it can find out is if it scans all the ports (preferrably 1024-65535) and eventually connects to the correct one. So how do other applications find the port? Easy, there are two of them. A control port that is well-known to the client app and doesn't change, and a data port that handles all data communications. The client would receive the data port number during some negotiation that you implement on the control port. What an example fo this? FTP does this. Port 21 is the FTP control port, 20 is the default port that data is sent over. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome