Virtualize wxSocketImpl creation by routing it via wxSocketManager.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 16 Aug 2009 23:13:45 +0000 (23:13 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 16 Aug 2009 23:13:45 +0000 (23:13 +0000)
commit4f260c9c68b42e6ccc82710efe6ca6e8418e721d
treec97801f7fe5ffc04247685a6d50c79186344c6bf
parent439293064d3533444eaafc95f0a65635152bf250
Virtualize wxSocketImpl creation by routing it via wxSocketManager.

This is necessary to create different kinds of sockets for the console and GUI
applications under OS X: unlike Unix which use different socket managers for
the console and GUI programs but still use the same data structures in both
cases as X11 and derived toolkits APIs are very similar, Core Foundation
sockets don't have anything in common with their console counterparts and so
we need to use different wxSocketImpl versions too.

A side effect of this commit is that now we need to force linking of
src/msw/sockmsw.cpp when using sockets: this wasn't necessary before because
it contained wxSocketImpl method definition but now that there are no more
direct dependencies on it, MSVC linker simply discards the object file unless
we force it to link with it.

Notice that this commit doesn't change anything yet, it simply refactors the
code to use wxSocketManager::CreateSocket() instead of wxSocketImpl::Create()
in preparation for the next change.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/private/socket.h
include/wx/unix/private/sockunix.h
src/common/socket.cpp
src/msw/sockmsw.cpp
src/unix/sockunix.cpp