Mercurial > 510Connectbot
comparison src/com/five_ten_sg/connectbot/transport/TN5250.java @ 13:b39bcf616a6f tn5250
adding tn5250 files
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 22 May 2014 18:56:41 -0700 |
parents | 6aaefb22d876 |
children | cfcb8d9859a8 |
comparison
equal
deleted
inserted
replaced
12:6aaefb22d876 | 13:b39bcf616a6f |
---|---|
20 import java.io.IOException; | 20 import java.io.IOException; |
21 import java.io.InputStream; | 21 import java.io.InputStream; |
22 import java.io.OutputStream; | 22 import java.io.OutputStream; |
23 import java.net.Socket; | 23 import java.net.Socket; |
24 import java.net.SocketException; | 24 import java.net.SocketException; |
25 import java.net.UnknownHostException; | |
25 import java.util.List; | 26 import java.util.List; |
26 import java.util.Map; | 27 import java.util.Map; |
28 import java.util.regex.Matcher; | |
29 import java.util.regex.Pattern; | |
27 | 30 |
28 import org.tn5250j.framework.tn5250.Screen5250; | 31 import org.tn5250j.framework.tn5250.Screen5250; |
29 import org.tn5250j.framework.tn5250.tnvt; | 32 import org.tn5250j.framework.tn5250.tnvt; |
30 | 33 |
34 import com.five_ten_sg.connectbot.R; | |
31 import com.five_ten_sg.connectbot.bean.HostBean; | 35 import com.five_ten_sg.connectbot.bean.HostBean; |
32 import com.five_ten_sg.connectbot.bean.PortForwardBean; | 36 import com.five_ten_sg.connectbot.bean.PortForwardBean; |
33 import com.five_ten_sg.connectbot.service.TerminalBridge; | 37 import com.five_ten_sg.connectbot.service.TerminalBridge; |
34 import com.five_ten_sg.connectbot.service.TerminalManager; | 38 import com.five_ten_sg.connectbot.service.TerminalManager; |
35 import com.five_ten_sg.connectbot.util.HostDatabase; | 39 import com.five_ten_sg.connectbot.util.HostDatabase; |
36 | 40 |
37 import android.content.Context; | 41 import android.content.Context; |
38 import android.net.Uri; | 42 import android.net.Uri; |
39 | 43 import android.util.Log; |
40 | 44 |
41 | 45 |
42 /** | 46 /** |
43 * @author Carl Byington | 47 * @author Carl Byington |
44 * | 48 * |
125 * After that call a session may be opened. | 129 * After that call a session may be opened. |
126 */ | 130 */ |
127 @Override | 131 @Override |
128 public void connect() { | 132 public void connect() { |
129 try { | 133 try { |
130 connected = tnvt.connect(host.getHostname(), host.getPort()); | 134 connected = handler.connect(host.getHostname(), host.getPort()); |
131 is = tnvt.bin; | 135 is = handler.bin; |
132 os = tnvt.bout; | 136 os = handler.bout; |
133 bridge.onConnected(); | 137 bridge.onConnected(); |
134 } | 138 } |
135 catch (UnknownHostException e) { | 139 catch (UnknownHostException e) { |
136 Log.d(TAG, "IO Exception connecting to host", e); | 140 Log.d(TAG, "IO Exception connecting to host", e); |
137 } | 141 } |
199 /** | 203 /** |
200 * Closes the connection to the terminal. Note that the resulting failure to read | 204 * Closes the connection to the terminal. Note that the resulting failure to read |
201 * should call {@link TerminalBridge#dispatchDisconnect(boolean)}. | 205 * should call {@link TerminalBridge#dispatchDisconnect(boolean)}. |
202 */ | 206 */ |
203 public void close() { | 207 public void close() { |
204 tnvt.disconnect(); | 208 handler.disconnect(); |
205 connected = false; | 209 connected = false; |
206 } | 210 } |
207 | 211 |
208 /** | 212 /** |
209 * Tells the transport what dimensions the display is currently | 213 * Tells the transport what dimensions the display is currently |