Sunday, December 23, 2001 09:07 AM
You're confused. The API is very simple:
Socket s = new Socket(host, port);
InputStream in = s.getInputStream();
BufferedReader r = new BufferedReader(in);
String line = r.readLine();
At any rate, this is an IO question, having nothing to do with Threads. USe the IO FAQ
You may also want to search for the FAQ on "non-blocking io" -- but I'm pretty sure that's not what you want.