diff src/com/five_ten_sg/connectbot/transport/TN5250.java @ 32:b086dd794dba tn5250

start tn5250 integration
author Carl Byington <carl@five-ten-sg.com>
date Tue, 10 Jun 2014 13:31:30 -0700
parents 139394237973
children 0395ca628303
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/transport/TN5250.java	Tue Jun 10 12:00:07 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/transport/TN5250.java	Tue Jun 10 13:31:30 2014 -0700
@@ -56,8 +56,6 @@
     private Screen5250 screen52;
     private tnvt       handler = null;
     private Socket     socket;
-    private int        width;
-    private int        height;
     private boolean    connected = false;
 
     static final Pattern hostmask;
@@ -130,6 +128,8 @@
    public void connect() {
         screen52  = new Screen5250();
         handler   = new tnvt(screen52, true, false, bridge, manager);
+        screen52.setVT(handler);
+        screen52.setBuffer(buffer);
         connected = handler.connect(host.getHostname(), host.getPort());
         if (connected) bridge.onConnected();
     }
@@ -192,12 +192,12 @@
 
 
     /**
-     * Closes the connection to the terminal. Note that the resulting failure to read
-     * should call {@link TerminalBridge#dispatchDisconnect(boolean)}.  !!!
+     * Closes the connection to the terminal.
      */
     public void close() {
         handler.disconnect();
         connected = false;
+        bridge.dispatchDisconnect(false);
     }