Skip to content
  • Paolo Bonzini's avatar
    aio-win32: add support for sockets · b493317d
    Paolo Bonzini authored
    
    
    Uses the same select/WSAEventSelect scheme as main-loop.c.
    WSAEventSelect() is edge-triggered, so it cannot be used
    directly, but it is still used as a way to exit from a
    blocking g_poll().
    
    Before g_poll() is called, we poll sockets with a non-blocking
    select() to achieve the level-triggered semantics we require:
    if a socket is ready, the g_poll() is made non-blocking too.
    
    Based on a patch from Or Goshen.
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    b493317d