Reading serial ports with a timeout...
Marc Lehmann
schmorp at schmorp.de
Fri Jul 19 18:27:01 CEST 2013
On Fri, Jul 19, 2013 at 05:07:59PM +0100, Dirk Koopman <djk at tobit.co.uk> wrote:
> type. But I want to place a timeout on that push_read, such that the
> push_read exits cleanly (with, by definition, no or not enough valid
> data).
You can set an "rtimeout" to detetc the timeout. There is, however, no
way to undo a push_read. You can destroy the handle and create a new one,
which will effectively remove all outstanding pushed reads.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
-=====/_/_//_/\_,_/ /_/\_\
More information about the anyevent
mailing list