• Show log

    Commit

  • Hash : 5ee507c8
    Author : Azat Khuzhin
    Date : 2019-03-04T06:53:42

    http: implement separate timeouts for read/write/connect phase
    
    This patch allows to change timeout for next events read/write/connect
    separatelly, using new API:
    
    - client:
      evhttp_connection_set_connect_timeout_tv() -- for connect
      evhttp_connection_set_read_timeout_tv()    -- for read
      evhttp_connection_set_write_timeout_tv()   -- for write
    
    - server:
      evhttp_set_read_timeout_tv()  -- for read
      evhttp_set_write_timeout_tv() -- for write
    
    It also changes a logic a little, before there was next fallbacks which
    does not handled in new API:
    - HTTP_CONNECT_TIMEOUT
    - HTTP_WRITE_TIMEOUT
    - HTTP_READ_TIMEOUT
    
    And introduce another internal flag (EVHTTP_CON_TIMEOUT_ADJUSTED) that
    will be used in evrpc, which adjust evhttp_connection timeout only if it
    is not default.
    
    Fixes: #692
    Fixes: #715