comparison src/org/tn5250j/framework/tn5250/DataStreamProducer.java @ 214:3e68cb17c0b6

socket runs dry sends flag to tnvt to call testChanged()
author Carl Byington <carl@five-ten-sg.com>
date Mon, 07 Jul 2014 15:09:22 -0700
parents 77ac18bc1b2f
children c438c2ff0052
comparison
equal deleted inserted replaced
213:d198328918fe 214:3e68cb17c0b6
144 baosin.reset(); 144 baosin.reset();
145 int j = -1; 145 int j = -1;
146 int i = 0; 146 int i = 0;
147 147
148 while (!done) { 148 while (!done) {
149 try {
150 if (bin.available() == 0) dsq.put(new Integer(0)); // trigger buffer.testChanged()
151 }
152 catch (Exception ex) {
153 Log.w(TAG, "readIncoming error " + ex.getMessage());
154 }
149 i = bin.read(); 155 i = bin.read();
150 156
151 // WVL - LDC : 16/07/2003 : TR.000345 157 // WVL - LDC : 16/07/2003 : TR.000345
152 // The inStream return -1 when end-of-stream is reached. This 158 // The inStream return -1 when end-of-stream is reached. This
153 // happens e.g. when the connection is closed from the AS/400. 159 // happens e.g. when the connection is closed from the AS/400.
216 dump(rBytes); 222 dump(rBytes);
217 } 223 }
218 224
219 if (negotiate) { 225 if (negotiate) {
220 // get the negotiation option 226 // get the negotiation option
227 try {
228 if (bin.available() == 0) dsq.put(new Integer(0)); // trigger buffer.testChanged()
229 }
230 catch (Exception ex) {
231 Log.w(TAG, "readIncoming error " + ex.getMessage());
232 }
221 baosin.write(bin.read()); 233 baosin.write(bin.read());
222 vt.negotiate(rBytes); 234 vt.negotiate(rBytes);
223 return null; 235 return null;
224 } 236 }
225 237