Winsock2 & overlapped IO

Ove Kaaven ovehk at ping.uio.no
Mon Nov 5 19:39:27 CST 2001


On Tue, 6 Nov 2001, Mike McCormack wrote:

> i don't know much about Winsock, but i can tell you how overlapped I/O
> is supposed to work in Wine.

Hm, by the way, when are you going to implemented overlapped
ConnectNamedPipe? That might make my rpcrt4 wait-for-connection code a bit
cleaner, so I don't have to spawn a separate thread per named pipe, and
worse, use TerminateThread to cancel the wait...

> So to get winsock to do overlapped, you may have to modify the winsock
> code to work like that... but the winsock code uses the service thread
> to wait upon sockets.

Not really, the wineserver does the grunt work. The service thread is only
used to implement WSAAsyncSelect, to post messages when the wineserver
says that it should. Winsock2 code is unlikely to use WSAAsyncSelect,
they'd rather do either WSAEventSelect (which doesn't use the service
thread, but is 100% wineserver-based), *or* overlapped I/O.

The challenges for winsock2 should be pretty much the same as those for
implementing something like ReadFileEx (which you've probably already
done) and the above-mentioned overlapped ConnectNamedPipe.





More information about the wine-devel mailing list