title: Client program that can connect to multiple servers simultaneously
body: <p>I have written a rudimentary server client program using sockets programming in JAVA. The server is multithreaded and can accept many client connections at once. The clients however are not multithreaded. The clients can upload, download, read, write and delete files from the server. I run the programs in the command prompt window so they don't have any external user interface. Up to this point my program works fine.</p>
  
  <p>I now want to make the client multithreaded as well so that it can simultaneously connect to multiple servers. I then want the client to be able to send requests to the servers. The client can choose which server to send the request to among the many servers it might be connected with.</p>
  
  <p>With that in mind I changed the client code to have multiple threads. But I dont know how I can choose between servers while the program is running. Is there a way to switch between threads at will in JAVA(while the program is running), so that I can choose which thread processes my request?</p>