Skip to content
Snippets Groups Projects
  • Andy Green's avatar
    a71eafce
    introduce timeout system · a71eafce
    Andy Green authored
    
    This adds a concept of timeouts for operations enforced by
    connection closure if the timeout is reached.
    
    Once a second all sockets are checked for timing out, every time
    there is a service call it checks to see if a second has passed since
    the last check and checks if so.
    
    You can also call libwebsocket_service_fd() with a NULL fd to give
    the timeouts a chance to be detected; if it's less than a second since
    the last check it returns immediately.
    
    Signed-off-by: default avatarAndy Green <andy@warmcat.com>
    a71eafce
    History
    introduce timeout system
    Andy Green authored
    
    This adds a concept of timeouts for operations enforced by
    connection closure if the timeout is reached.
    
    Once a second all sockets are checked for timing out, every time
    there is a service call it checks to see if a second has passed since
    the last check and checks if so.
    
    You can also call libwebsocket_service_fd() with a NULL fd to give
    the timeouts a chance to be detected; if it's less than a second since
    the last check it returns immediately.
    
    Signed-off-by: default avatarAndy Green <andy@warmcat.com>