I am engaging the following problems:
Others have mentioned that you can use the nio library to reduce the number of threads necessary. i just wanted to point out that your current example code will not work. you must use a thread per socket when using the standard io streams. the available()
method is pretty much useless (in general) and will not stop your control thread from blocking.