|
-1 returned from read(byte[], int, int) doesn't mean an EOF character
was read. It means that the sequence of IP packets is done.
As I recall, when the 5250 controller sends a readMDT, it stops
sending and starts waiting for a response. It appears to me that the
behavior is as expected.
I think the error lies in trying to read again after the readMDT is
received.
If it is as I suspect, the read after receiving readMDT is going to
send an ENQ and the 5250 controller will send back NAK as it is
itself waiting for data. As a matter of fact, the ENQ may be followed
by an ACK, as the receiver is expecting data and says "right, go
ahead and send", but your read never sends anything, so the receiver
would time out and start sending NAK's which may trigger the -1. Hard
to tell as there are so many layers of protocol involved.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.