qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] broken socket events on win32 qemu


From: Paolo Bonzini
Subject: Re: [Qemu-devel] broken socket events on win32 qemu
Date: Mon, 7 Mar 2016 09:24:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0


On 07/03/2016 08:23, Andrew Baumann wrote:
> Without having looked very closely at the code, I suspect the problem
> may be that we've lost the special-case treatment of socket handles as
> distinct from file descriptors on Win32 (they are different namespaces,
> and different APIs are needed). The previous version of qemu-char.c
> special-cased sockets in io_channel_from_socket():
> 
> -#ifdef _WIN32
> -    chan = g_io_channel_win32_new_socket(fd);
> -#else
> -    chan = g_io_channel_unix_new(fd);
> -#endif
> 
> ... but I don't see anything equivalent in io/channel-socket.c. Am I
> looking in the wrong place?

You're right, we need to add a qio_channel_create_socket_watch, which
just calls qio_channel_create_fd_watch on Unix but uses select and
WSAEnumNetworkEvents on Win32.  I have already implemented this trick in
aio-win32.c for networked block devices.

Andrew or Daniel, it would be great if you added a failing testcase to
test-io-channel-socket.c.  I can work on the fix myself.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]