Mercurial > 510Connectbot
diff app/src/main/java/com/five_ten_sg/connectbot/service/TerminalMonitor.java @ 470:2cc170e3fc9b stable-1.9.3-8
audible bell checkbox enables/disables bell volume setting; monitor init string is now a url socket://target/initstring
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 04 Oct 2019 16:44:44 -0700 |
parents | 4776062555f3 |
children | d7461da8145b |
line wrap: on
line diff
--- a/app/src/main/java/com/five_ten_sg/connectbot/service/TerminalMonitor.java Thu Sep 12 16:08:16 2019 -0700 +++ b/app/src/main/java/com/five_ten_sg/connectbot/service/TerminalMonitor.java Fri Oct 04 16:44:44 2019 -0700 @@ -64,12 +64,13 @@ public static final char CURSOR_USER_KEY = 2; private static final int MONITORPORT = 6000; - private static final String LOCALHOST = "127.0.0.1"; private Context parent = null; private vt320 buffer = null; private View view = null; private HostBean host = null; + private Uri uri = null; + private String target = null; private String init = null; private int start_line = 0; // monitor part of the screen for changes private int end_line = 500; // "" @@ -190,7 +191,7 @@ Log.i(TAG, "bound to service"); try { - InetAddress serverAddr = InetAddress.getByName(LOCALHOST); + InetAddress serverAddr = InetAddress.getByName(target); int tries = 0; while (tries < 10) { try { @@ -234,12 +235,14 @@ }; - public TerminalMonitor(Context parent, vt320 buffer, View view, HostBean host, String init) { + public TerminalMonitor(Context parent, vt320 buffer, View view, HostBean host, String url) { this.parent = parent; this.buffer = buffer; this.view = view; this.host = host; - this.init = init; + this.uri = Uri.parse(url); + this.target = uri.getHost(); + this.init = uri.getPath(); // setup the windows->android keymapping // http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731 keymap = new HashMap<Integer, Integer>();