// Open a socket to the given host
String reader = Thread.currentThread().getName(); if (reader.startsWith("Reader")) { String retval = result.toString(); result = new StringBuffer(); return retval; } else { return ""; }
// Read data from a socket into the result string buffer