Home  Contents

rawio:flush

Rawio Core4 Lua Event System

SYNOPSIS

handle:flush()

DESCRIPTION

Discards any data present in the receive buffer, but not yet read by the application.

RETURN VALUE

On success, returns true. On failure, returns nil. In case of an error, the error can be retrieved using rawio:lastError().

ERRORS

This function works only on TTY devices.

NOTES

You can never be sure that the receive buffer is empty afterwards, since data may arrive right after the call to rawio:drain().

SEE ALSO