Receives the response from the server and writes it to an OutputStream
Definition at line 354 of file Sender.java. References fix::ErrorWindow::setMess(). Referenced by send(). { String s = ""; String result = ""; try { while (((s = from_server.readLine()) != null) && s.length() > 0) { result = result + s + "\r\n"; if (debug) { System.err.println("\t" + s); } } } catch (IOException e) { if (e.getMessage().equals("Connection reset")) { // && // e.getClass().equals(new java.net.SocketException())) { System.out.println("Communication terminated. Server has reset the connection."); } lastReply = result.split("\r\n")[0]; er.setMess("Can not read from Server: " + lastReply, e); } lastReply = result.replaceAll("\r\n$", ""); return lastReply; }
|