by don lowenstein » Mon Aug 27, 2007 10:51 pm
Antonio,
I'm having erratic results on reading the return response from the host. I have inserted timing loops, etc but can't get consistant.
With the test programs and msgstop's and debugger, things work well. In my application, it's almost like sometimes I'm active and receive the host messages, other times I "miss" them. I'm telling my app to sleep() and inkey(.25) etc, then testing for the getdata(), but most times (not all) the returned data is empty. I do know that the host side is returning data.
Question: Why won't the getdata() method work consistantly? Also, in the sample programs, when the socket is getting ready to close, a msginfo() is invoked, and this in turn invokes the onread event. Almost like without the msginfo() the socket doesn't "wake up" for handling the read event. Does this make sense?
How can I control the onread event BEFORE ending the socket.