procedure FlushOutBuffer;
Clears the output buffers used by both the device driver and the Async Professional CLX internal dispatcher.
Any data pending in the output buffer is not transmitted.
The following example discards any data that hasn't yet been transmitted whenever an application function named ErrorDetected returns True after a remote device reports an error:
if ErrorDetected then begin
ApxComPort.FlushOutBuffer;
...resync with remote
end;
See also: FlushInBuffer