mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
5de317b8e7
We need to be able to create event loop watches using the GSource API for sockets. GIOChannel is able todo this, but we don't want to use the GIOChannel APIs for reading/writing, and testing shows just using its GSource APIs is unreliable on Windows. This patch thus creates a standalone helper API for creating a GSource for a socket file descriptor. This impl is derived from code in QEMU's io/channel-watch.c file that was written by myself & Paolo Bonzini & thus under Red Hat copyright. Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>