listener.logerror("Couldn't poll for input.");
listener.logerror("Couldn't poll for input: " + ioe.getMessage()); } if (lastPing != 0 && System.currentTimeMillis() - lastPing > TIMEOUT) { listener.logerror("Ping timeout.");  connect(); login(); } else if (registered && lastPing == 0 && System.currentTimeMillis() - lastMessage > TIMEOUT) { lastPing = System.currentTimeMillis(); String outmsg = "PING " + lastPing + "\n"; try { out.write(outmsg); out.flush(); } catch (IOException ioe) { listener.logerror("Couldn't ping the server."); }
	void poll() {		String msg;		try {			while (in.ready()) {				msg = in.readLine();				if (!pong(msg)) {					decipherMessage(msg);				}				if (msg.indexOf("001") != -1) {					registered = true;				}			}		} catch (IOException ioe) {			listener.logerror("Couldn't poll for input.");		}	}