lib/src/main/java/edu/berkeley/boinc/rpc/RpcClient.java
public boolean open(String address, int port) {
		if (isConnected()) {
			// Already connected
			if(edu.berkeley.boinc.utils.Logging.LOGLEVEL <= 4) Log.e(Logging.TAG, "Attempt to connect when already connected");
			// We better close current connection and reconnect (address/port could be different)
			close();
		}
		try {
      mSocket = new Socket();
      mSocket.connect(new InetSocketAddress(address, port), CONNECT_TIMEOUT);
      mSocket.setSoTimeout(READ_TIMEOUT);
      mInput = mSocket.getInputStream();
      mOutput = new OutputStreamWriter(mSocket.getOutputStream(), "ISO8859_1");
		}
		catch (IllegalArgumentException e) {
			if(edu.berkeley.boinc.utils.Logging.LOGLEVEL <= 4) Log.e(Logging.TAG, "connect failure: illegal argument", e);
			mSocket = null;
			return false;
		}
		catch (IOException e) {
			if(Logging.WARNING) Log.w(Logging.TAG, "connect failure", e);
			mSocket = null;
			return false;
		}
		catch (Exception e) {
			if(Logging.WARNING) Log.w(Logging.TAG, "connect failure", e);
			mSocket = null;
			return false;
		}
		if(Logging.DEBUG) Log.d(Logging.TAG, "Connected successfully");
		return true;
	}
/**
	 * Connect to BOINC core client via Unix Domain Socket (abstract, "boinc_socket")
	 * @return true for success, false for failure
	 */
Connect to BOINC core client via Unix Domain Socket (abstract, "boinc_socket")
@return true for success, false for failure
Connect to BOINC core client via Unix Domain Socket ( abstract " boinc_socket " ) @return true for success false for failure
public boolean open(String address, int port) {
		if (isConnected()) {
			if(edu.berkeley.boinc.utils.Logging.LOGLEVEL <= 4) Log.e(Logging.TAG, "Attempt to connect when already connected");
			close();
		}
		try {
      mSocket = new Socket();
      mSocket.connect(new InetSocketAddress(address, port), CONNECT_TIMEOUT);
      mSocket.setSoTimeout(READ_TIMEOUT);
      mInput = mSocket.getInputStream();
      mOutput = new OutputStreamWriter(mSocket.getOutputStream(), "ISO8859_1");
		}
		catch (IllegalArgumentException e) {
			if(edu.berkeley.boinc.utils.Logging.LOGLEVEL <= 4) Log.e(Logging.TAG, "connect failure: illegal argument", e);
			mSocket = null;
			return false;
		}
		catch (IOException e) {
			if(Logging.WARNING) Log.w(Logging.TAG, "connect failure", e);
			mSocket = null;
			return false;
		}
		catch (Exception e) {
			if(Logging.WARNING) Log.w(Logging.TAG, "connect failure", e);
			mSocket = null;
			return false;
		}
		if(Logging.DEBUG) Log.d(Logging.TAG, "Connected successfully");
		return true;
	}
public boolean open ( String address , int port ) { if ( isConnected ( ) ) { if ( edu . berkeley . boinc . utils . Logging . LOGLEVEL <= 4 ) Log . e ( Logging . TAG , "Attempt to connect when already connected" ) ; close ( ) ; } try { mSocket = new Socket ( ) ; mSocket . connect ( new InetSocketAddress ( address , port ) , CONNECT_TIMEOUT ) ; mSocket . setSoTimeout ( READ_TIMEOUT ) ; mInput = mSocket . getInputStream ( ) ; mOutput = new OutputStreamWriter ( mSocket . getOutputStream ( ) , "ISO8859_1" ) ; } catch ( IllegalArgumentException e ) { if ( edu . berkeley . boinc . utils . Logging . LOGLEVEL <= 4 ) Log . e ( Logging . TAG , "connect failure: illegal argument" , e ) ; mSocket = null ; return false ; } catch ( IOException e ) { if ( Logging . WARNING ) Log . w ( Logging . TAG , "connect failure" , e ) ; mSocket = null ; return false ; } catch ( Exception e ) { if ( Logging . WARNING ) Log . w ( Logging . TAG , "connect failure" , e ) ; mSocket = null ; return false ; } if ( Logging . DEBUG ) Log . d ( Logging . TAG , "Connected successfully" ) ; return true ; }
Connect to BOINC core client via Unix Domain Socket (abstract, "boinc_socket")
 @return true for success, false for failure
Connect to BOINC core client via Unix Domain Socket ( abstract " boinc_socket " ) @return true for success false for failure
// Already connected // We better close current connection and reconnect (address/port could be different)