
Advice on handeling protocol transfer via COM Port requested
Quote:
> Thanks Scott,
> So I would set ReadIntervalTimeout and ReadFile would wait this period
> of time for two characters (my [ASCII DLE character] andd [1 byte
> packet ID]) ? Is that right?
No. First, the function is SetCommTimeout. Its sets the time ReadFile waits
while there is no input. In other words, every received character resets the
timer. If no character is received for the set interval then ReadFile returns.
So if you set an appropriate interval it will return after the end of a received
message, independent of the message length. Think of it as an inactivity
detector, not a character detector.
--
Scott McPhillips [VC++ MVP]