multiple server, single client

???
I`m talking about programs in java
I have already created the socket and the servers are hardware devices listening on TCP/IP. Servers may be more than 100.
Now I have to send different data packets to different servers (hardware devices).
But when I create a socket for that, the server is not getting connected.

Here, some servers may be acting as clients when they initiate the connection. At that time I get the ipaddress and port of that hardware device and store it in database.

As some servers connect to my client, when I try to create socket, I dont know whether that server is idle or busy.
How can I know this.

Socket s = new Socket(ipaddress of server, port of server);

mail me: himakiran@netindial.com

please help me