comparison src/com/five_ten_sg/connectbot/service/TerminalBridge.java @ 15:1588e359a972

queue pending monitor commands until socket is open
author Carl Byington <carl@five-ten-sg.com>
date Thu, 29 May 2014 12:40:27 -0700
parents 0ce5cc452d02
children 01d939969b10
comparison
equal deleted inserted replaced
1:ab7313512aba 15:1588e359a972
212 Log.d(TAG, s); 212 Log.d(TAG, s);
213 } 213 }
214 @Override 214 @Override
215 public void write(byte[] b) { 215 public void write(byte[] b) {
216 try { 216 try {
217 if (b != null && transport != null) 217 if (b != null && transport != null) {
218 if (monitor != null) monitor.hostData(b); 218 if (monitor != null) monitor.hostData(b);
219 219 transport.write(b);
220 transport.write(b); 220 }
221 } 221 }
222 catch (IOException e) { 222 catch (IOException e) {
223 Log.e(TAG, "Problem writing outgoing data in vt320() thread", e); 223 Log.e(TAG, "Problem writing outgoing data in vt320() thread", e);
224 } 224 }
225 } 225 }
226 @Override 226 @Override
227 public void write(int b) { 227 public void write(int b) {
228 try { 228 try {
229 if (transport != null) 229 if (transport != null) {
230 if (monitor != null) monitor.hostData(b); 230 if (monitor != null) monitor.hostData(b);
231 231 transport.write(b);
232 transport.write(b); 232 }
233 } 233 }
234 catch (IOException e) { 234 catch (IOException e) {
235 Log.e(TAG, "Problem writing outgoing data in vt320() thread", e); 235 Log.e(TAG, "Problem writing outgoing data in vt320() thread", e);
236 } 236 }
237 } 237 }