Paul Fulghum ha scritto: > There is no one policy here that will make everyone happy. > Some will want all the data before some was lost, > others the data after some was lost. IMVHO the only sane thing is ALWAYS avoid "holes" (some old data, then the "hole" of lost data, then some new data) after a flush(). HW buffers (and buffers on the remote end) are not an issue: they contain fresher data (usually in "sliding window" mode) than buffered.
Thinking with a 300bps modem (anybody else remembers such an ancient thing?): - Sender have to transmit the alphabet; - On the sender's modem there's a 4 char buffer - On the receiver's modem there's another 4 char buffer - The receiver's driver have another 4 char buffer If the receiver issues a flush() after reading 'C', then the next read() should return FGHIJKL...Z (or anything IN SEQUENCE), but *NEVER* DEFGKLM (skipped H,I and J). BYtE, Diego. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users