private void talkTo(String av[]) { if (av.length >= 1) host = av[0]; else host = "10.196.2.55"; // host = "192.168.1.230"; if (av.length >= 2) portNum = Integer.parseInt(av[1]); else portNum = 30004; System.out.println("Host " + host + "; port " + portNum); try { Socket s = new Socket(host, portNum); this.addNewADSBHub(); // Connect the remote to our stdout Pipe pipe = new Pipe(s.getInputStream(), System.out); // new Pipe(s.getInputStream(), System.out).start(); pipe.setSensor(sensor); pipe.start(); // Connect our stdin to the remote // new Pipe(System.in, s.getOutputStream()).start(); } catch (IOException e) { System.out.println(e); return; } System.out.println("Connected OK"); }