app/src/main/java/io/github/kranex/rota/Client.java
/* opens a socket to host:port, and initialises in and out */
opens a socket to host:port, and initialises in and out
opens a socket to host : port and initialises in and out
private boolean openSocket(String host, int port){
        try {
            socket = new Socket(host, port);
            Log.d("CLIENT", "isConnected: " + socket.isConnected());
            out = socket.getOutputStream();
            in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
        }catch(Exception e){
            Log.e("ERROR",e.getMessage());
            kill();
            return false;
        }
        return true;
    }
private boolean openSocket ( String host , int port ) { try { socket = new Socket ( host , port ) ; Log . d ( "CLIENT" , "isConnected: " + socket . isConnected ( ) ) ; out = socket . getOutputStream ( ) ; in = new BufferedReader ( new InputStreamReader ( socket . getInputStream ( ) ) ) ; } catch ( Exception e ) { Log . e ( "ERROR" , e . getMessage ( ) ) ; kill ( ) ; return false ; } return true ; }
opens a socket to host:port, and initialises in and out
opens a socket to host : port and initialises in and out