io: implement socket watch for win32 using WSAEventSelect+select
commita58972056776e2f2588aed5a2dc0db7cc28f80b1
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 7 Mar 2016 11:12:36 +0000 (7 12:12 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 10 Mar 2016 17:19:07 +0000 (10 17:19 +0000)
treec0dd41eda6b2fb73dd1b477b17723c695aa0a6a1
parent30fd3e27907dfd1c0c66cc1339657af1a2ce1d4b
io: implement socket watch for win32 using WSAEventSelect+select

On Win32 we cannot directly poll on socket handles. Instead we
create a Win32 event object and associate the socket handle with
the event. When the event signals readyness we then have to
use select to determine which events are ready. Creating Win32
events is moderately heavyweight, so we don't want todo it
every time we create a GSource, so this associates a single
event with a QIOChannel.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
include/io/channel.h
io/channel-socket.c
io/channel-watch.c
io/channel.c