Wednesday, November 30, 2011

How to check a port is open or not





Usually when we are working under proxy server or Programming socket server, Port might be in use. or couldn't open port. in that case you can check and make sure the port is open or not .

  • Open command prompt or start -- run -- telnet localhost 1345
  •  Where localhost is 127.0.0.1, i.e your host machine.
  •  And press Enter you will see black screen open , It means that port already in use or port is available for Server Socket Programming or you can start your server in that specific port
  •  Find the below screenshot. 

 Following shows the port not in use


 If the screen shows connecting to IP.... ,and close immediately . Then the port is not in use.

Find the below screen to confirm port is open
i

Once you telnet, if the screen appears blank , then the port is open.