Stuff
public text v1 · immutable public String Request(String cmd) {
String fromServer;
StringBuffer ret = new StringBuffer();
// send command to server
System.out.println("Client.Request(): Sending \"" + cmd + "\" to server...\n");
out.println(cmd);
try {
// wait for response from server
while ((fromServer = in.readLine()) != null) {
System.out.println("Client.Request(): FromServer: " + fromServer + "\n");
ret.append(fromServer);
}
} catch (IOException e) {
return e.toString();
}
return ret.toString();
}