1.看一个socket实例,直接调用java api即可
介绍java中的使用thread pool达到内部线程重用,在android也有msg的thread pool
Executors.newFixedThreadPool(poolSize)
* Creates a thread pool that reuses a fixed number of threads
* operating off a shared unbounded queue. At any point, at most
* <tt>nThreads</tt> threads will be active processing tasks.
* If additional tasks are submitted when all threads are active,
* they will wait in the queue until a thread is available.
* If any thread terminates due to a failure during execution
* prior to shutdown, a new one will take its