PDA

View Full Version : Port connection



bindushree
14th July 2009, 05:49
Hi all,

I have a application which connects to a port with a specified IP-address, say telnet with port-23. If some other application is also connected to the same port, it alows the connection to happen. How can the connection of two applications on the same port be avoided??

Please share your ideas!!!!!

aamer4yu
14th July 2009, 06:24
You mean you want to limit connection on the machine you are connecting to ? If its a server application written by you, you can modify it to close connection if one connection is already established. This way u limit the number.

If the server application is not your code, then there must be some API or way to know if other clients are connected as well. If they are, you can from your client application gracefully close the connection.