lib/src/main/java/edu/berkeley/boinc/rpc/RpcClient.java
public synchronized boolean connectionAlive() {
		if (!isConnected()) return false;
		try {
			// We just get the status via socket and do not parse reply
			sendRequest("<get_cc_status/>\n");
			String result = receiveReply();
			if (result.length() == 0) {
				// End of stream reached and no data were received in reply
				// We assume that socket is closed on the other side,
				// most probably client shut down
				return false;
			}
			return true;
		}
		catch (IOException e) {
			return false;
		}
	}
/**
	 * Checks whether current connection can be used (data can be sent and received)
	 * This is achieved by sending the empty BOINC command - so in case there is
	 * socket still opened, but other side already closed connection, it will be detected.
	 * @return true if other side responds, false if data cannot be sent or received
	 */
Checks whether current connection can be used (data can be sent and received)
This is achieved by sending the empty BOINC command - so in case there is
socket still opened, but other side already closed connection, it will be detected.
@return true if other side responds, false if data cannot be sent or received
Checks whether current connection can be used ( data can be sent and received ) This is achieved by sending the empty BOINC command - so in case there is socket still opened but other side already closed connection it will be detected . @return true if other side responds false if data cannot be sent or received
public synchronized boolean connectionAlive() {
		if (!isConnected()) return false;
		try {
			sendRequest("<get_cc_status/>\n");
			String result = receiveReply();
			if (result.length() == 0) {
				return false;
			}
			return true;
		}
		catch (IOException e) {
			return false;
		}
	}
public synchronized boolean connectionAlive ( ) { if ( ! isConnected ( ) ) return false ; try { sendRequest ( "<get_cc_status/>\n" ) ; String result = receiveReply ( ) ; if ( result . length ( ) == 0 ) { return false ; } return true ; } catch ( IOException e ) { return false ; } }
Checks whether current connection can be used (data can be sent and received)
 This is achieved by sending the empty BOINC command - so in case there is
 socket still opened, but other side already closed connection, it will be detected.
Checks whether current connection can be used ( data can be sent and received ) This is achieved by sending the empty BOINC command - so in case there is socket still opened but other side already closed connection it will be detected .
// We just get the status via socket and do not parse reply // End of stream reached and no data were received in reply // We assume that socket is closed on the other side, // most probably client shut down