• Show log

    Commit

  • Hash : d3288293
    Author : Nick Mathewson
    Date : 2010-02-20T18:44:35

    Provide consistent, tested semantics for bufferevent timeouts
    
    The different bufferevent implementations had different behavior for
    their timeouts.  Some of them kept re-triggering the timeouts
    indefinitely; some disabled the event immediately the first time a
    timeout triggered.  Some of them made the timeouts only count when
    the bufferevent was actively trying to read or write; some did not.
    
    The new behavior is modeled after old socket bufferevents, since
    they were here first and their behavior is relatively sane.
    Basically, each timeout disables the bufferevent's corresponding
    read or write operation when it fires.  Timeouts are stopped
    whenever we suspend writing or reading, and reset whenever we
    unsuspend writing or reading.  Calling bufferevent_enable resets a
    timeout, as does changing the timeout value.