
31 Jan
2011
31 Jan
'11
5:47 p.m.
On Sun, Jan 30, 2011 at 01:21:37PM +0100, arnaud.champion@devatom.fr wrote:
Hi,
One thing I need to understand, in the callback python or c samples, the fileDescriptor is on a socket or on a pipe ?
Internally libvirt may have a opened pipe, file, socket, or something else. In all cases, the 'fd' parameter that is passed to callbacks is what Microsoft call "a C runtime file descriptor". In particular what you get in a callback is *not* a HANDLE or SOCKET object, even if the underlying object libvirt has internally is a SOCKET/HANDLE. Basically the libvirt code on Windows that creates sockets does SOCKET s = WSASocket(...) int fd = _open_osfhandle(s); The callback gets 'fd', and not 's'. Regard, Daniel