[EXPERIMENTAL PATCH]: Winsock2

Francois Gouget fgouget at free.fr
Wed Nov 7 14:23:27 CST 2001


On Wed, 7 Nov 2001, Andreas Mohr wrote:

> On Wed, Nov 07, 2001 at 10:54:02AM -0800, Francois Gouget wrote:
> >  * 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 :-)
> Hmm ?
> Sorry, but this directory stuff sounds rather dainbread to me.
> IMHO winsock/wsock32 should be in winsock/, and ws2_32 should be in winsock2/
> Or, maybe even better, use winsock1/ instead of winsock/.
> 
> WTH would you want to do it in a different way ?

   I actually don't care about the directories or their names. Here are
the goals:

 * implement the two libraries dealing with version 1 of the API as a
dll pair. Currently the 16bit implementation is in dlls/winsock while
the 32bit implementation of that API is in dlls/wsock32. That does not
seem logical.

 * remove all the 16bit aspects from the library implementing the
version 2 of the API, i.e. ws2_32. ws2_32 does not have a 16bit version
so it should not have to bother with 16bit stuff. This would also
simplify the code of ws2_32.

 * make ws2_32 independent from the other winsock implementations, i.e.
it should not call wsock32. I believe this is already the case... except
that it is mixed up with the 16bit library.

 * implement the version 1 API by using ws2_32 whenever possible to
avoid code duplication.

   As far as directory names are concerned, libwsock32.so is implemented
in a directory called 'dlls/wsock32'. That seems logical to me. The
library 'libws2_32.so' is implemented in a directory called
'dlls/winsock'. If we try to name the directories after the name of the
'main' library, 'dlls/ws2_32' may be better. But it is not going to be a
huge Wine architectural gain :-)


--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
      Broadcast message : fin du monde dans cinq minutes, repentez vous !





More information about the wine-devel mailing list