[EXPERIMENTAL PATCH]: Winsock2
fgouget at free.fr
Wed Nov 7 12:54:02 CST 2001
On Wed, 7 Nov 2001, Martin Wilck wrote:
> this patch tries to implement a small part of the extended
> Winsock 2 functionality in Wine. It is very experimental,
> I have only made sure everything compiles.
> It is _NOT_ intended for people to try and run.
> I am submitting this patch because I am pretty new to Wine hacking
> and I'd appreciate some Wine gurus to audit this for obvious stupidity,
> style incompatiblities, etc.
> Features implemented:
> - WSAAccept(), including callback functionality.
> - WSASocket(): support for dwFlags parameter.
> The real difficult stuff will follow when I start looking into
> WSARecv(), WSASend(), and WSAGetOverlappedResults().
> Thus it'd be nice if someone pointed out my misconceptions before
> I put real work into the latter.
I will leave it to someone else to comment on the meat of the matter
but still, here are a couple of comments:
* To answer your question:
/* Code copied largely from WSOCK32_accept() */
/* FIXME: Can we simply call WSOCK32_accept() instead ? */
/* I wasn't sure because of the AsyncSelect stuff at the end,
which presumably should only be called if the connection is accepted */
Winsock2 should not call the wsock32 library. It should be the
opposite. One of the things on my todo list (but whether I will have
time to actually do it is another matter) is to reorganize the winsock
libraries so that wsock32 and winsock are together in dlls/wsock32. The
reason is that they both implement the winsock1 API except one is 16bit
and the other 32bits. Then in dlls/winsock we would be left with just
ws2_32 which implements the winsock2 API. So having ws2_32 call to
wsock32 is not going in the right direction :-)
* I am currently working on a big reorganization of the winsock headers
(I'm a bit late in resubmitting my patches but I will resubmit them) so
there is going to be a clash with 'winsock2.h'. But don't worry about it
too much. I will try to integrate all the changes in your current patch
in my version before submitting it. Then you will only have to take care
of any later additions.
* Also, to give you a heads up, the prefix for all functions will
switch from 'WSOCK32_' to 'WS_'. Well, it's not that hard to deal with.
* I don't think you need to specify which structures/fields are
unsupported in the header file. After all they could be unsupported in
one function and supported in another. I see that you also put this info
in the relevant functions so it should be enough.
Looks good to me.
Welcome to the Wine project. It's always good to have some new blood.
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
The software said it requires Win95 or better, so I installed Linux.
More information about the wine-devel