procedure FlushInBuffer;
Clears the input buffers used by both the communications driver and the Async Professional CLX internal dispatcher.
It also resets all data triggers so as to disregard any cleared data.
The following example flushes all data currently in the input buffer if a line error is detected. You probably shouldn't do this routinely after each line error. Logic like this is usually appropriate only before trying to resynchronize with the transmitter in a file transfer protocol.
if ApxComPort.LineError <> leNoError then begin
...error handling
ApxComPort.FlushInBuffer;
end;
See also: FlushOutBuffer