On 7 Jan 2002, Alexandre Julliard wrote: > > Do you _really_ consider it "clean" to use the WSAOVERLAPPED fields for > > arbitrary, unrelated Wine-internal data? > > Not really, but this is apparently what Windows does.
I just made a test run on Win NT. The "Internal" field is used for some status information, the "InternalHigh" field for the number of bytes received/sent. There is no indication that Windows uses the "Offset"/"OffsetHigh" fields. Thus, I think we could use Internal and InternalHigh as in File IO, but we'd better leave the Offset/OffsetHigh fields alone. > Another way is to have a completion_func inside of winsock that takes > 3 args and in turn calls the user-specified func that takes 4 > args. This way synchro.c does not need to know about it at all. I don't consider that very "clean", either. > The basic infrastructure has to be generic enough to support all kinds > of async I/O. If it cannot it should be improved, but we must not work > around the lack of generality by adding winsock-specific hacks in the > kernel layers. IMO synchro.c is for handling _async requests_. Currently it has a lot of information on ReadFileEx()-type async requests built in which is unnecessary to make async requests work and makes implementing async socket IO a lot harder than a true "generic" interface would be. There is nothing wrong with that, since File IO has been the only type of async request supported so far. All I'm asking for is to make this structure a little more generic so that I can implement async IO on sockets without a festival of casts and ugly hacks in the winsock code. IMO the synchro.c code ideally should know nothing about e.g. the number of arguments a completion function takes, neither for file nor socket IO. I have understood that you don't like the idea of case distinctions in synchro.c - fine. I was suggesting it primarily for performance reasons. Martin -- Martin Wilck Phone: +49 5251 8 15113 Fujitsu Siemens Computers Fax: +49 5251 8 20409 Heinz-Nixdorf-Ring 1 mailto:[EMAIL PROTECTED] D-33106 Paderborn http://www.fujitsu-siemens.com/primergy