wx/zipstrm.h \
wx/zstream.h \
wx/private/fdiodispatcher.h \
+ wx/private/gsocketiohandler.h \
wx/private/selectdispatcher.h \
wx/unix/app.h \
wx/unix/apptbase.h \
src/common/xtistrm.cpp \
src/common/zipstrm.cpp \
src/common/zstream.cpp \
+ src/common/gsocketiohandler.cpp \
src/common/fdiodispatcher.cpp \
src/common/selectdispatcher.cpp \
src/unix/appunix.cpp \
src/mac/carbon/thread.cpp \
src/mac/carbon/morefilex/MoreFilesX.c \
src/mac/corefoundation/cfstring.cpp \
+ src/mac/corefoundation/gsockosx.cpp \
src/mac/corefoundation/stdpaths_cf.cpp \
src/mac/corefoundation/strconv_cf.cpp \
src/mac/corefoundation/utilsexc_base.cpp \
src/common/url.cpp \
src/unix/gsocket.cpp \
src/msw/gsocket.cpp \
+ src/msw/gsockmsw.cpp \
src/msw/urlmsw.cpp \
$(NET_WINCE_SRC) \
src/xml/xml.cpp \
@COND_TOOLKIT_X11@OPENGL_HDR_PLATFORM = wx/x11/glcanvas.h wx/unix/glx11.h
COND_TOOLKIT__BASE_MACOSX_HDR = \
wx/private/fdiodispatcher.h \
+ wx/private/gsocketiohandler.h \
wx/private/selectdispatcher.h \
wx/unix/app.h \
wx/unix/apptbase.h \
@COND_TOOLKIT_@BASE_MACOSX_HDR = $(COND_TOOLKIT__BASE_MACOSX_HDR)
COND_TOOLKIT_COCOA_BASE_MACOSX_HDR = \
wx/private/fdiodispatcher.h \
+ wx/private/gsocketiohandler.h \
wx/private/selectdispatcher.h \
wx/unix/app.h \
wx/unix/apptbase.h \
@COND_TOOLKIT_COCOA@BASE_MACOSX_HDR = $(COND_TOOLKIT_COCOA_BASE_MACOSX_HDR)
COND_TOOLKIT_GTK_BASE_MACOSX_HDR = \
wx/private/fdiodispatcher.h \
+ wx/private/gsocketiohandler.h \
wx/private/selectdispatcher.h \
wx/unix/app.h \
wx/unix/apptbase.h \
@COND_TOOLKIT_MAC@BASE_MACOSX_HDR = $(COND_TOOLKIT_MAC_BASE_MACOSX_HDR)
COND_TOOLKIT_MOTIF_BASE_MACOSX_HDR = \
wx/private/fdiodispatcher.h \
+ wx/private/gsocketiohandler.h \
wx/private/selectdispatcher.h \
wx/unix/app.h \
wx/unix/apptbase.h \
@COND_TOOLKIT_MOTIF@BASE_MACOSX_HDR = $(COND_TOOLKIT_MOTIF_BASE_MACOSX_HDR)
COND_TOOLKIT_X11_BASE_MACOSX_HDR = \
wx/private/fdiodispatcher.h \
+ wx/private/gsocketiohandler.h \
wx/private/selectdispatcher.h \
wx/unix/app.h \
wx/unix/apptbase.h \
@COND_PLATFORM_OS2_1@BASE_PLATFORM_HDR = $(COND_PLATFORM_OS2_1_BASE_PLATFORM_HDR)
COND_PLATFORM_UNIX_1_BASE_PLATFORM_HDR = \
wx/private/fdiodispatcher.h \
+ wx/private/gsocketiohandler.h \
wx/private/selectdispatcher.h \
wx/unix/app.h \
wx/unix/apptbase.h \
monodll_thread.o \
monodll_MoreFilesX.o \
monodll_cfstring.o \
+ monodll_gsockosx.o \
monodll_stdpaths_cf.o \
monodll_strconv_cf.o \
monodll_utilsexc_base.o \
monodll_utilsexc.o
@COND_PLATFORM_OS2_1@__BASE_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_OS2_1___BASE_PLATFORM_SRC_OBJECTS)
COND_PLATFORM_UNIX_1___BASE_PLATFORM_SRC_OBJECTS = \
+ monodll_gsocketiohandler.o \
monodll_fdiodispatcher.o \
monodll_selectdispatcher.o \
monodll_appunix.o \
@COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS)
@COND_TOOLKIT_WINCE@__BASE_WINCE_SRC_OBJECTS = monodll_time.o
COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS = \
+ monodll_gsocketiohandler.o \
monodll_fdiodispatcher.o \
monodll_selectdispatcher.o \
monodll_appunix.o \
monodll_threadpsx.o \
monodll_timerunx.o \
monodll_cfstring.o \
+ monodll_gsockosx.o \
monodll_stdpaths_cf.o \
monodll_strconv_cf.o \
monodll_utilsexc_base.o
@COND_TOOLKIT_@__BASE_MACOSX_SRC_OBJECTS = $(COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS)
COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS = \
+ monodll_gsocketiohandler.o \
monodll_fdiodispatcher.o \
monodll_selectdispatcher.o \
monodll_appunix.o \
monodll_threadpsx.o \
monodll_timerunx.o \
monodll_cfstring.o \
+ monodll_gsockosx.o \
monodll_stdpaths_cf.o \
monodll_strconv_cf.o \
monodll_utilsexc_base.o
@COND_TOOLKIT_COCOA@__BASE_MACOSX_SRC_OBJECTS = $(COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS)
COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS = \
+ monodll_gsocketiohandler.o \
monodll_fdiodispatcher.o \
monodll_selectdispatcher.o \
monodll_appunix.o \
monodll_threadpsx.o \
monodll_timerunx.o \
monodll_cfstring.o \
+ monodll_gsockosx.o \
monodll_stdpaths_cf.o \
monodll_strconv_cf.o \
monodll_utilsexc_base.o
monodll_thread.o \
monodll_MoreFilesX.o \
monodll_cfstring.o \
+ monodll_gsockosx.o \
monodll_stdpaths_cf.o \
monodll_strconv_cf.o \
monodll_utilsexc_base.o \
monodll_timerunx.o
@COND_TOOLKIT_MAC@__BASE_MACOSX_SRC_OBJECTS = $(COND_TOOLKIT_MAC___BASE_MACOSX_SRC_OBJECTS)
COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS = \
+ monodll_gsocketiohandler.o \
monodll_fdiodispatcher.o \
monodll_selectdispatcher.o \
monodll_appunix.o \
monodll_threadpsx.o \
monodll_timerunx.o \
monodll_cfstring.o \
+ monodll_gsockosx.o \
monodll_stdpaths_cf.o \
monodll_strconv_cf.o \
monodll_utilsexc_base.o
@COND_TOOLKIT_MOTIF@__BASE_MACOSX_SRC_OBJECTS = $(COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS)
COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS = \
+ monodll_gsocketiohandler.o \
monodll_fdiodispatcher.o \
monodll_selectdispatcher.o \
monodll_appunix.o \
monodll_threadpsx.o \
monodll_timerunx.o \
monodll_cfstring.o \
+ monodll_gsockosx.o \
monodll_stdpaths_cf.o \
monodll_strconv_cf.o \
monodll_utilsexc_base.o
@COND_PLATFORM_MACOS_1@__NET_PLATFORM_SRC_OBJECTS = monodll_gsocket.o
@COND_PLATFORM_OS2_1@__NET_PLATFORM_SRC_OBJECTS = monodll_gsocket.o
@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS = monodll_gsocket.o
-@COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS = \
-@COND_PLATFORM_WIN32_1@ monodll_gsocket.o monodll_urlmsw.o \
-@COND_PLATFORM_WIN32_1@ $(__NET_WINCE_SRC_OBJECTS)
+COND_PLATFORM_WIN32_1___NET_PLATFORM_SRC_OBJECTS = \
+ monodll_gsocket.o \
+ monodll_gsockmsw.o \
+ monodll_urlmsw.o \
+ $(__NET_WINCE_SRC_OBJECTS)
+@COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_WIN32_1___NET_PLATFORM_SRC_OBJECTS)
@COND_TOOLKIT_WINCE@__NET_WINCE_SRC_OBJECTS = monodll_net.o
COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS = \
$(__CORE_SRC_OBJECTS) \
monodll_vscroll.o
@COND_USE_GUI_1_WXUNIV_1@__CORE_SRC_OBJECTS = $(COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS)
@COND_TOOLKIT_COCOA@__LOWLEVEL_SRC_OBJECTS = \
-@COND_TOOLKIT_COCOA@ monodll_gsockosx.o monodll_hid.o monodll_utilsexc_cf.o
+@COND_TOOLKIT_COCOA@ monodll_hid.o monodll_utilsexc_cf.o
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS = \
monodll_fontmgrcmn.o \
- monodll_gsocketiohandler.o \
monodll_caret.o \
monodll_colour.o \
monodll_icon.o \
monodll_gdiobj.o \
monodll_gdiplus.o \
monodll_graphics.o \
- monodll_gsockmsw.o \
monodll_icon.o \
monodll_imaglist.o \
monodll_minifram.o \
monodll_gdiobj.o \
monodll_gdiplus.o \
monodll_graphics.o \
- monodll_gsockmsw.o \
monodll_icon.o \
monodll_imaglist.o \
monodll_minifram.o \
monodll_fontutil.o \
monodll_utilsx11.o \
monodll_displayx11.o \
- monodll_gsocketiohandler.o \
monodll_icon.o \
monodll_timer.o \
monodll_app.o \
monodll_utilscocoa.o
@COND_PLATFORM_MACOSX_1@__MAC_OSX_SRC_OBJECTS = $(COND_PLATFORM_MACOSX_1___MAC_OSX_SRC_OBJECTS)
@COND_TOOLKIT_COCOA@__LOWLEVEL_SRC_OBJECTS_1 = \
-@COND_TOOLKIT_COCOA@ monodll_gsockosx.o monodll_hid.o monodll_utilsexc_cf.o
+@COND_TOOLKIT_COCOA@ monodll_hid.o monodll_utilsexc_cf.o
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_1 = \
monodll_fontmgrcmn.o \
- monodll_gsocketiohandler.o \
monodll_caret.o \
monodll_colour.o \
monodll_icon.o \
monodll_gdiobj.o \
monodll_gdiplus.o \
monodll_graphics.o \
- monodll_gsockmsw.o \
monodll_icon.o \
monodll_imaglist.o \
monodll_minifram.o \
monodll_gdiobj.o \
monodll_gdiplus.o \
monodll_graphics.o \
- monodll_gsockmsw.o \
monodll_icon.o \
monodll_imaglist.o \
monodll_minifram.o \
monodll_fontutil.o \
monodll_utilsx11.o \
monodll_displayx11.o \
- monodll_gsocketiohandler.o \
monodll_icon.o \
monodll_timer.o \
monodll_app.o \
monolib_thread.o \
monolib_MoreFilesX.o \
monolib_cfstring.o \
+ monolib_gsockosx.o \
monolib_stdpaths_cf.o \
monolib_strconv_cf.o \
monolib_utilsexc_base.o \
monolib_utilsexc.o
@COND_PLATFORM_OS2_1@__BASE_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_OS2_1___BASE_PLATFORM_SRC_OBJECTS_1)
COND_PLATFORM_UNIX_1___BASE_PLATFORM_SRC_OBJECTS_1 = \
+ monolib_gsocketiohandler.o \
monolib_fdiodispatcher.o \
monolib_selectdispatcher.o \
monolib_appunix.o \
@COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1)
@COND_TOOLKIT_WINCE@__BASE_WINCE_SRC_OBJECTS_1 = monolib_time.o
COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS_1 = \
+ monolib_gsocketiohandler.o \
monolib_fdiodispatcher.o \
monolib_selectdispatcher.o \
monolib_appunix.o \
monolib_threadpsx.o \
monolib_timerunx.o \
monolib_cfstring.o \
+ monolib_gsockosx.o \
monolib_stdpaths_cf.o \
monolib_strconv_cf.o \
monolib_utilsexc_base.o
@COND_TOOLKIT_@__BASE_MACOSX_SRC_OBJECTS_1 = $(COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS_1)
COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_1 = \
+ monolib_gsocketiohandler.o \
monolib_fdiodispatcher.o \
monolib_selectdispatcher.o \
monolib_appunix.o \
monolib_threadpsx.o \
monolib_timerunx.o \
monolib_cfstring.o \
+ monolib_gsockosx.o \
monolib_stdpaths_cf.o \
monolib_strconv_cf.o \
monolib_utilsexc_base.o
@COND_TOOLKIT_COCOA@__BASE_MACOSX_SRC_OBJECTS_1 = $(COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_1)
COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS_1 = \
+ monolib_gsocketiohandler.o \
monolib_fdiodispatcher.o \
monolib_selectdispatcher.o \
monolib_appunix.o \
monolib_threadpsx.o \
monolib_timerunx.o \
monolib_cfstring.o \
+ monolib_gsockosx.o \
monolib_stdpaths_cf.o \
monolib_strconv_cf.o \
monolib_utilsexc_base.o
monolib_thread.o \
monolib_MoreFilesX.o \
monolib_cfstring.o \
+ monolib_gsockosx.o \
monolib_stdpaths_cf.o \
monolib_strconv_cf.o \
monolib_utilsexc_base.o \
monolib_timerunx.o
@COND_TOOLKIT_MAC@__BASE_MACOSX_SRC_OBJECTS_1 = $(COND_TOOLKIT_MAC___BASE_MACOSX_SRC_OBJECTS_1)
COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS_1 = \
+ monolib_gsocketiohandler.o \
monolib_fdiodispatcher.o \
monolib_selectdispatcher.o \
monolib_appunix.o \
monolib_threadpsx.o \
monolib_timerunx.o \
monolib_cfstring.o \
+ monolib_gsockosx.o \
monolib_stdpaths_cf.o \
monolib_strconv_cf.o \
monolib_utilsexc_base.o
@COND_TOOLKIT_MOTIF@__BASE_MACOSX_SRC_OBJECTS_1 = $(COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS_1)
COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS_1 = \
+ monolib_gsocketiohandler.o \
monolib_fdiodispatcher.o \
monolib_selectdispatcher.o \
monolib_appunix.o \
monolib_threadpsx.o \
monolib_timerunx.o \
monolib_cfstring.o \
+ monolib_gsockosx.o \
monolib_stdpaths_cf.o \
monolib_strconv_cf.o \
monolib_utilsexc_base.o
@COND_PLATFORM_MACOS_1@__NET_PLATFORM_SRC_OBJECTS_1 = monolib_gsocket.o
@COND_PLATFORM_OS2_1@__NET_PLATFORM_SRC_OBJECTS_1 = monolib_gsocket.o
@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_1 = monolib_gsocket.o
-@COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS_1 \
-@COND_PLATFORM_WIN32_1@ = monolib_gsocket.o monolib_urlmsw.o \
-@COND_PLATFORM_WIN32_1@ $(__NET_WINCE_SRC_OBJECTS_1)
+COND_PLATFORM_WIN32_1___NET_PLATFORM_SRC_OBJECTS_1 = \
+ monolib_gsocket.o \
+ monolib_gsockmsw.o \
+ monolib_urlmsw.o \
+ $(__NET_WINCE_SRC_OBJECTS_1)
+@COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_WIN32_1___NET_PLATFORM_SRC_OBJECTS_1)
@COND_TOOLKIT_WINCE@__NET_WINCE_SRC_OBJECTS_1 = monolib_net.o
COND_USE_GUI_1___MONOLIB_GUI_SRC_OBJECTS_1 = \
$(__CORE_SRC_OBJECTS_1) \
monolib_vscroll.o
@COND_USE_GUI_1_WXUNIV_1@__CORE_SRC_OBJECTS_1 = $(COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_1)
@COND_TOOLKIT_COCOA@__LOWLEVEL_SRC_OBJECTS_2 = \
-@COND_TOOLKIT_COCOA@ monolib_gsockosx.o monolib_hid.o monolib_utilsexc_cf.o
+@COND_TOOLKIT_COCOA@ monolib_hid.o monolib_utilsexc_cf.o
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_2 = \
monolib_fontmgrcmn.o \
- monolib_gsocketiohandler.o \
monolib_caret.o \
monolib_colour.o \
monolib_icon.o \
monolib_gdiobj.o \
monolib_gdiplus.o \
monolib_graphics.o \
- monolib_gsockmsw.o \
monolib_icon.o \
monolib_imaglist.o \
monolib_minifram.o \
monolib_gdiobj.o \
monolib_gdiplus.o \
monolib_graphics.o \
- monolib_gsockmsw.o \
monolib_icon.o \
monolib_imaglist.o \
monolib_minifram.o \
monolib_fontutil.o \
monolib_utilsx11.o \
monolib_displayx11.o \
- monolib_gsocketiohandler.o \
monolib_icon.o \
monolib_timer.o \
monolib_app.o \
monolib_utilscocoa.o
@COND_PLATFORM_MACOSX_1@__MAC_OSX_SRC_OBJECTS_1 = $(COND_PLATFORM_MACOSX_1___MAC_OSX_SRC_OBJECTS_1)
@COND_TOOLKIT_COCOA@__LOWLEVEL_SRC_OBJECTS_3 = \
-@COND_TOOLKIT_COCOA@ monolib_gsockosx.o monolib_hid.o monolib_utilsexc_cf.o
+@COND_TOOLKIT_COCOA@ monolib_hid.o monolib_utilsexc_cf.o
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_3 = \
monolib_fontmgrcmn.o \
- monolib_gsocketiohandler.o \
monolib_caret.o \
monolib_colour.o \
monolib_icon.o \
monolib_gdiobj.o \
monolib_gdiplus.o \
monolib_graphics.o \
- monolib_gsockmsw.o \
monolib_icon.o \
monolib_imaglist.o \
monolib_minifram.o \
monolib_gdiobj.o \
monolib_gdiplus.o \
monolib_graphics.o \
- monolib_gsockmsw.o \
monolib_icon.o \
monolib_imaglist.o \
monolib_minifram.o \
monolib_fontutil.o \
monolib_utilsx11.o \
monolib_displayx11.o \
- monolib_gsocketiohandler.o \
monolib_icon.o \
monolib_timer.o \
monolib_app.o \
basedll_thread.o \
basedll_MoreFilesX.o \
basedll_cfstring.o \
+ basedll_gsockosx.o \
basedll_stdpaths_cf.o \
basedll_strconv_cf.o \
basedll_utilsexc_base.o \
basedll_utilsexc.o
@COND_PLATFORM_OS2_1@__BASE_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_OS2_1___BASE_PLATFORM_SRC_OBJECTS_2)
COND_PLATFORM_UNIX_1___BASE_PLATFORM_SRC_OBJECTS_2 = \
+ basedll_gsocketiohandler.o \
basedll_fdiodispatcher.o \
basedll_selectdispatcher.o \
basedll_appunix.o \
@COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2)
@COND_TOOLKIT_WINCE@__BASE_WINCE_SRC_OBJECTS_2 = basedll_time.o
COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS_2 = \
+ basedll_gsocketiohandler.o \
basedll_fdiodispatcher.o \
basedll_selectdispatcher.o \
basedll_appunix.o \
basedll_threadpsx.o \
basedll_timerunx.o \
basedll_cfstring.o \
+ basedll_gsockosx.o \
basedll_stdpaths_cf.o \
basedll_strconv_cf.o \
basedll_utilsexc_base.o
@COND_TOOLKIT_@__BASE_MACOSX_SRC_OBJECTS_2 = $(COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS_2)
COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_2 = \
+ basedll_gsocketiohandler.o \
basedll_fdiodispatcher.o \
basedll_selectdispatcher.o \
basedll_appunix.o \
basedll_threadpsx.o \
basedll_timerunx.o \
basedll_cfstring.o \
+ basedll_gsockosx.o \
basedll_stdpaths_cf.o \
basedll_strconv_cf.o \
basedll_utilsexc_base.o
@COND_TOOLKIT_COCOA@__BASE_MACOSX_SRC_OBJECTS_2 = $(COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_2)
COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS_2 = \
+ basedll_gsocketiohandler.o \
basedll_fdiodispatcher.o \
basedll_selectdispatcher.o \
basedll_appunix.o \
basedll_threadpsx.o \
basedll_timerunx.o \
basedll_cfstring.o \
+ basedll_gsockosx.o \
basedll_stdpaths_cf.o \
basedll_strconv_cf.o \
basedll_utilsexc_base.o
basedll_thread.o \
basedll_MoreFilesX.o \
basedll_cfstring.o \
+ basedll_gsockosx.o \
basedll_stdpaths_cf.o \
basedll_strconv_cf.o \
basedll_utilsexc_base.o \
basedll_timerunx.o
@COND_TOOLKIT_MAC@__BASE_MACOSX_SRC_OBJECTS_2 = $(COND_TOOLKIT_MAC___BASE_MACOSX_SRC_OBJECTS_2)
COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS_2 = \
+ basedll_gsocketiohandler.o \
basedll_fdiodispatcher.o \
basedll_selectdispatcher.o \
basedll_appunix.o \
basedll_threadpsx.o \
basedll_timerunx.o \
basedll_cfstring.o \
+ basedll_gsockosx.o \
basedll_stdpaths_cf.o \
basedll_strconv_cf.o \
basedll_utilsexc_base.o
@COND_TOOLKIT_MOTIF@__BASE_MACOSX_SRC_OBJECTS_2 = $(COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS_2)
COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS_2 = \
+ basedll_gsocketiohandler.o \
basedll_fdiodispatcher.o \
basedll_selectdispatcher.o \
basedll_appunix.o \
basedll_threadpsx.o \
basedll_timerunx.o \
basedll_cfstring.o \
+ basedll_gsockosx.o \
basedll_stdpaths_cf.o \
basedll_strconv_cf.o \
basedll_utilsexc_base.o
baselib_thread.o \
baselib_MoreFilesX.o \
baselib_cfstring.o \
+ baselib_gsockosx.o \
baselib_stdpaths_cf.o \
baselib_strconv_cf.o \
baselib_utilsexc_base.o \
baselib_utilsexc.o
@COND_PLATFORM_OS2_1@__BASE_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_OS2_1___BASE_PLATFORM_SRC_OBJECTS_3)
COND_PLATFORM_UNIX_1___BASE_PLATFORM_SRC_OBJECTS_3 = \
+ baselib_gsocketiohandler.o \
baselib_fdiodispatcher.o \
baselib_selectdispatcher.o \
baselib_appunix.o \
@COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3)
@COND_TOOLKIT_WINCE@__BASE_WINCE_SRC_OBJECTS_3 = baselib_time.o
COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS_3 = \
+ baselib_gsocketiohandler.o \
baselib_fdiodispatcher.o \
baselib_selectdispatcher.o \
baselib_appunix.o \
baselib_threadpsx.o \
baselib_timerunx.o \
baselib_cfstring.o \
+ baselib_gsockosx.o \
baselib_stdpaths_cf.o \
baselib_strconv_cf.o \
baselib_utilsexc_base.o
@COND_TOOLKIT_@__BASE_MACOSX_SRC_OBJECTS_3 = $(COND_TOOLKIT____BASE_MACOSX_SRC_OBJECTS_3)
COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_3 = \
+ baselib_gsocketiohandler.o \
baselib_fdiodispatcher.o \
baselib_selectdispatcher.o \
baselib_appunix.o \
baselib_threadpsx.o \
baselib_timerunx.o \
baselib_cfstring.o \
+ baselib_gsockosx.o \
baselib_stdpaths_cf.o \
baselib_strconv_cf.o \
baselib_utilsexc_base.o
@COND_TOOLKIT_COCOA@__BASE_MACOSX_SRC_OBJECTS_3 = $(COND_TOOLKIT_COCOA___BASE_MACOSX_SRC_OBJECTS_3)
COND_TOOLKIT_GTK___BASE_MACOSX_SRC_OBJECTS_3 = \
+ baselib_gsocketiohandler.o \
baselib_fdiodispatcher.o \
baselib_selectdispatcher.o \
baselib_appunix.o \
baselib_threadpsx.o \
baselib_timerunx.o \
baselib_cfstring.o \
+ baselib_gsockosx.o \
baselib_stdpaths_cf.o \
baselib_strconv_cf.o \
baselib_utilsexc_base.o
baselib_thread.o \
baselib_MoreFilesX.o \
baselib_cfstring.o \
+ baselib_gsockosx.o \
baselib_stdpaths_cf.o \
baselib_strconv_cf.o \
baselib_utilsexc_base.o \
baselib_timerunx.o
@COND_TOOLKIT_MAC@__BASE_MACOSX_SRC_OBJECTS_3 = $(COND_TOOLKIT_MAC___BASE_MACOSX_SRC_OBJECTS_3)
COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS_3 = \
+ baselib_gsocketiohandler.o \
baselib_fdiodispatcher.o \
baselib_selectdispatcher.o \
baselib_appunix.o \
baselib_threadpsx.o \
baselib_timerunx.o \
baselib_cfstring.o \
+ baselib_gsockosx.o \
baselib_stdpaths_cf.o \
baselib_strconv_cf.o \
baselib_utilsexc_base.o
@COND_TOOLKIT_MOTIF@__BASE_MACOSX_SRC_OBJECTS_3 = $(COND_TOOLKIT_MOTIF___BASE_MACOSX_SRC_OBJECTS_3)
COND_TOOLKIT_X11___BASE_MACOSX_SRC_OBJECTS_3 = \
+ baselib_gsocketiohandler.o \
baselib_fdiodispatcher.o \
baselib_selectdispatcher.o \
baselib_appunix.o \
baselib_threadpsx.o \
baselib_timerunx.o \
baselib_cfstring.o \
+ baselib_gsockosx.o \
baselib_stdpaths_cf.o \
baselib_strconv_cf.o \
baselib_utilsexc_base.o
@COND_PLATFORM_MACOS_1@__NET_PLATFORM_SRC_OBJECTS_2 = netdll_gsocket.o
@COND_PLATFORM_OS2_1@__NET_PLATFORM_SRC_OBJECTS_2 = netdll_gsocket.o
@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_2 = netdll_gsocket.o
-@COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS_2 \
-@COND_PLATFORM_WIN32_1@ = netdll_gsocket.o netdll_urlmsw.o \
-@COND_PLATFORM_WIN32_1@ $(__NET_WINCE_SRC_OBJECTS_2)
+COND_PLATFORM_WIN32_1___NET_PLATFORM_SRC_OBJECTS_2 = \
+ netdll_gsocket.o \
+ netdll_gsockmsw.o \
+ netdll_urlmsw.o \
+ $(__NET_WINCE_SRC_OBJECTS_2)
+@COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_WIN32_1___NET_PLATFORM_SRC_OBJECTS_2)
@COND_TOOLKIT_WINCE@__NET_WINCE_SRC_OBJECTS_2 = netdll_net.o
COND_MONOLITHIC_0_SHARED_0___netlib___depname = \
$(LIBDIRNAME)/$(LIBPREFIX)wx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net-$(WX_RELEASE)$(HOST_SUFFIX)$(LIBEXT)
@COND_PLATFORM_MACOS_1@__NET_PLATFORM_SRC_OBJECTS_3 = netlib_gsocket.o
@COND_PLATFORM_OS2_1@__NET_PLATFORM_SRC_OBJECTS_3 = netlib_gsocket.o
@COND_PLATFORM_UNIX_1@__NET_PLATFORM_SRC_OBJECTS_3 = netlib_gsocket.o
-@COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS_3 \
-@COND_PLATFORM_WIN32_1@ = netlib_gsocket.o netlib_urlmsw.o \
-@COND_PLATFORM_WIN32_1@ $(__NET_WINCE_SRC_OBJECTS_3)
+COND_PLATFORM_WIN32_1___NET_PLATFORM_SRC_OBJECTS_3 = \
+ netlib_gsocket.o \
+ netlib_gsockmsw.o \
+ netlib_urlmsw.o \
+ $(__NET_WINCE_SRC_OBJECTS_3)
+@COND_PLATFORM_WIN32_1@__NET_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_WIN32_1___NET_PLATFORM_SRC_OBJECTS_3)
@COND_TOOLKIT_WINCE@__NET_WINCE_SRC_OBJECTS_3 = netlib_net.o
@COND_SHARED_1@____wxnet_namedll_DEP = $(__netdll___depname)
@COND_SHARED_0@____wxnet_namelib_DEP = $(__netlib___depname)
coredll_vscroll.o
@COND_USE_GUI_1_WXUNIV_1@__CORE_SRC_OBJECTS_2 = $(COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_2)
@COND_TOOLKIT_COCOA@__LOWLEVEL_SRC_OBJECTS_4 = \
-@COND_TOOLKIT_COCOA@ coredll_gsockosx.o coredll_hid.o coredll_utilsexc_cf.o
+@COND_TOOLKIT_COCOA@ coredll_hid.o coredll_utilsexc_cf.o
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_4 = \
coredll_fontmgrcmn.o \
- coredll_gsocketiohandler.o \
coredll_caret.o \
coredll_colour.o \
coredll_icon.o \
coredll_gdiobj.o \
coredll_gdiplus.o \
coredll_graphics.o \
- coredll_gsockmsw.o \
coredll_icon.o \
coredll_imaglist.o \
coredll_minifram.o \
coredll_gdiobj.o \
coredll_gdiplus.o \
coredll_graphics.o \
- coredll_gsockmsw.o \
coredll_icon.o \
coredll_imaglist.o \
coredll_minifram.o \
coredll_fontutil.o \
coredll_utilsx11.o \
coredll_displayx11.o \
- coredll_gsocketiohandler.o \
coredll_icon.o \
coredll_timer.o \
coredll_app.o \
coredll_utilscocoa.o
@COND_PLATFORM_MACOSX_1@__MAC_OSX_SRC_OBJECTS_2 = $(COND_PLATFORM_MACOSX_1___MAC_OSX_SRC_OBJECTS_2)
@COND_TOOLKIT_COCOA@__LOWLEVEL_SRC_OBJECTS_5 = \
-@COND_TOOLKIT_COCOA@ coredll_gsockosx.o coredll_hid.o coredll_utilsexc_cf.o
+@COND_TOOLKIT_COCOA@ coredll_hid.o coredll_utilsexc_cf.o
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_5 = \
coredll_fontmgrcmn.o \
- coredll_gsocketiohandler.o \
coredll_caret.o \
coredll_colour.o \
coredll_icon.o \
coredll_gdiobj.o \
coredll_gdiplus.o \
coredll_graphics.o \
- coredll_gsockmsw.o \
coredll_icon.o \
coredll_imaglist.o \
coredll_minifram.o \
coredll_gdiobj.o \
coredll_gdiplus.o \
coredll_graphics.o \
- coredll_gsockmsw.o \
coredll_icon.o \
coredll_imaglist.o \
coredll_minifram.o \
coredll_fontutil.o \
coredll_utilsx11.o \
coredll_displayx11.o \
- coredll_gsocketiohandler.o \
coredll_icon.o \
coredll_timer.o \
coredll_app.o \
corelib_vscroll.o
@COND_USE_GUI_1_WXUNIV_1@__CORE_SRC_OBJECTS_3 = $(COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_3)
@COND_TOOLKIT_COCOA@__LOWLEVEL_SRC_OBJECTS_6 = \
-@COND_TOOLKIT_COCOA@ corelib_gsockosx.o corelib_hid.o corelib_utilsexc_cf.o
+@COND_TOOLKIT_COCOA@ corelib_hid.o corelib_utilsexc_cf.o
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_6 = \
corelib_fontmgrcmn.o \
- corelib_gsocketiohandler.o \
corelib_caret.o \
corelib_colour.o \
corelib_icon.o \
corelib_gdiobj.o \
corelib_gdiplus.o \
corelib_graphics.o \
- corelib_gsockmsw.o \
corelib_icon.o \
corelib_imaglist.o \
corelib_minifram.o \
corelib_gdiobj.o \
corelib_gdiplus.o \
corelib_graphics.o \
- corelib_gsockmsw.o \
corelib_icon.o \
corelib_imaglist.o \
corelib_minifram.o \
corelib_fontutil.o \
corelib_utilsx11.o \
corelib_displayx11.o \
- corelib_gsocketiohandler.o \
corelib_icon.o \
corelib_timer.o \
corelib_app.o \
corelib_utilscocoa.o
@COND_PLATFORM_MACOSX_1@__MAC_OSX_SRC_OBJECTS_3 = $(COND_PLATFORM_MACOSX_1___MAC_OSX_SRC_OBJECTS_3)
@COND_TOOLKIT_COCOA@__LOWLEVEL_SRC_OBJECTS_7 = \
-@COND_TOOLKIT_COCOA@ corelib_gsockosx.o corelib_hid.o corelib_utilsexc_cf.o
+@COND_TOOLKIT_COCOA@ corelib_hid.o corelib_utilsexc_cf.o
COND_TOOLKIT_DFB___LOWLEVEL_SRC_OBJECTS_7 = \
corelib_fontmgrcmn.o \
- corelib_gsocketiohandler.o \
corelib_caret.o \
corelib_colour.o \
corelib_icon.o \
corelib_gdiobj.o \
corelib_gdiplus.o \
corelib_graphics.o \
- corelib_gsockmsw.o \
corelib_icon.o \
corelib_imaglist.o \
corelib_minifram.o \
corelib_gdiobj.o \
corelib_gdiplus.o \
corelib_graphics.o \
- corelib_gsockmsw.o \
corelib_icon.o \
corelib_imaglist.o \
corelib_minifram.o \
corelib_fontutil.o \
corelib_utilsx11.o \
corelib_displayx11.o \
- corelib_gsocketiohandler.o \
corelib_icon.o \
corelib_timer.o \
corelib_app.o \
@COND_SHARED_0@____SHARED =
@COND_SHARED_1@____SHARED = $(PIC_FLAG)
@COND_PLATFORM_MACOSX_1@__MAC_LOWLEVEL_SRC_OBJECTS \
-@COND_PLATFORM_MACOSX_1@ = monodll_gsockosx.o monodll_hid.o \
-@COND_PLATFORM_MACOSX_1@ monodll_utilsexc_cf.o
+@COND_PLATFORM_MACOSX_1@ = monodll_hid.o monodll_utilsexc_cf.o
COND_PLATFORM_UNIX_1_TOOLKIT_MGL___ADVANCED_PLATFORM_SRC_OBJECTS = \
monodll_taskbarcmn.o \
monodll_joystick.o \
monodll_taskbarx11.o
@COND_TOOLKIT_X11@__ADVANCED_PLATFORM_SRC_OBJECTS = $(COND_TOOLKIT_X11___ADVANCED_PLATFORM_SRC_OBJECTS)
@COND_PLATFORM_MACOSX_1@__MAC_LOWLEVEL_SRC_OBJECTS_0 \
-@COND_PLATFORM_MACOSX_1@ = monolib_gsockosx.o monolib_hid.o \
-@COND_PLATFORM_MACOSX_1@ monolib_utilsexc_cf.o
+@COND_PLATFORM_MACOSX_1@ = monolib_hid.o monolib_utilsexc_cf.o
COND_PLATFORM_UNIX_1_TOOLKIT_MGL___ADVANCED_PLATFORM_SRC_OBJECTS_0 = \
monolib_taskbarcmn.o \
monolib_joystick.o \
monolib_taskbarx11.o
@COND_TOOLKIT_X11@__ADVANCED_PLATFORM_SRC_OBJECTS_0 = $(COND_TOOLKIT_X11___ADVANCED_PLATFORM_SRC_OBJECTS_0)
@COND_PLATFORM_MACOSX_1@__MAC_LOWLEVEL_SRC_OBJECTS_8 \
-@COND_PLATFORM_MACOSX_1@ = coredll_gsockosx.o coredll_hid.o \
-@COND_PLATFORM_MACOSX_1@ coredll_utilsexc_cf.o
+@COND_PLATFORM_MACOSX_1@ = coredll_hid.o coredll_utilsexc_cf.o
@COND_PLATFORM_MACOSX_1@__MAC_LOWLEVEL_SRC_OBJECTS_9 \
-@COND_PLATFORM_MACOSX_1@ = corelib_gsockosx.o corelib_hid.o \
-@COND_PLATFORM_MACOSX_1@ corelib_utilsexc_cf.o
+@COND_PLATFORM_MACOSX_1@ = corelib_hid.o corelib_utilsexc_cf.o
@COND_PLATFORM_UNIX_1_TOOLKIT_MGL@__ADVANCED_PLATFORM_SRC_OBJECTS_8 \
@COND_PLATFORM_UNIX_1_TOOLKIT_MGL@ = advdll_taskbarcmn.o advdll_joystick.o \
@COND_PLATFORM_UNIX_1_TOOLKIT_MGL@ advdll_sound.o advdll_taskbarx11.o
monodll_url.o: $(srcdir)/src/common/url.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/url.cpp
+monodll_gsockmsw.o: $(srcdir)/src/msw/gsockmsw.cpp $(MONODLL_ODEP)
+ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/gsockmsw.cpp
+
monodll_urlmsw.o: $(srcdir)/src/msw/urlmsw.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/urlmsw.cpp
monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/unix/sound_sdl.cpp
+@COND_PLATFORM_UNIX_1@monodll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@monodll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@monodll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@monodll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@monodll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@monodll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
@COND_PLATFORM_UNIX_1@monodll_fdiodispatcher.o: $(srcdir)/src/common/fdiodispatcher.cpp $(MONODLL_ODEP)
@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/fdiodispatcher.cpp
@COND_PLATFORM_MACOS_1@monodll_cfstring.o: $(srcdir)/src/mac/corefoundation/cfstring.cpp $(MONODLL_ODEP)
@COND_PLATFORM_MACOS_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/cfstring.cpp
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@monodll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@monodll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@monodll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@monodll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@monodll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@monodll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOS_1@monodll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONODLL_ODEP)
+@COND_PLATFORM_MACOS_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@monodll_stdpaths_cf.o: $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp $(MONODLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@monodll_graphics.o: $(srcdir)/src/mac/carbon/graphics.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/carbon/graphics.cpp
-@COND_TOOLKIT_MSW_USE_GUI_1@monodll_gsockmsw.o: $(srcdir)/src/msw/gsockmsw.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_MSW_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/gsockmsw.cpp
-
-@COND_TOOLKIT_WINCE_USE_GUI_1@monodll_gsockmsw.o: $(srcdir)/src/msw/gsockmsw.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_WINCE_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/gsockmsw.cpp
-
@COND_TOOLKIT_MSW_USE_GUI_1@monodll_dropsrc.o: $(srcdir)/src/msw/ole/dropsrc.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/ole/dropsrc.cpp
@COND_TOOLKIT_MSW_USE_GUI_1@monodll_uuid.o: $(srcdir)/src/msw/ole/uuid.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/msw/ole/uuid.cpp
-@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@monodll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONODLL_ODEP)
-@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
-
-@COND_TOOLKIT_COCOA_USE_GUI_1@monodll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
-
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@monodll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONODLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
@COND_TOOLKIT_COCOA_USE_GUI_1@monodll_utilsexc_cf.o: $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp
-@COND_TOOLKIT_X11_USE_GUI_1@monodll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_X11_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
-
-@COND_TOOLKIT_DFB_USE_GUI_1@monodll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
-
@COND_TOOLKIT_X11_USE_GUI_1@monodll_nanox.o: $(srcdir)/src/x11/nanox.c $(MONODLL_ODEP)
@COND_TOOLKIT_X11_USE_GUI_1@ $(CCC) -c -o $@ $(MONODLL_CFLAGS) $(srcdir)/src/x11/nanox.c
monolib_url.o: $(srcdir)/src/common/url.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/url.cpp
+monolib_gsockmsw.o: $(srcdir)/src/msw/gsockmsw.cpp $(MONOLIB_ODEP)
+ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/gsockmsw.cpp
+
monolib_urlmsw.o: $(srcdir)/src/msw/urlmsw.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/urlmsw.cpp
monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/unix/sound_sdl.cpp
+@COND_PLATFORM_UNIX_1@monolib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@monolib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@monolib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@monolib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@monolib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@monolib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
@COND_PLATFORM_UNIX_1@monolib_fdiodispatcher.o: $(srcdir)/src/common/fdiodispatcher.cpp $(MONOLIB_ODEP)
@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/fdiodispatcher.cpp
@COND_PLATFORM_MACOS_1@monolib_cfstring.o: $(srcdir)/src/mac/corefoundation/cfstring.cpp $(MONOLIB_ODEP)
@COND_PLATFORM_MACOS_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/cfstring.cpp
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@monolib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@monolib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@monolib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@monolib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@monolib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@monolib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOS_1@monolib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONOLIB_ODEP)
+@COND_PLATFORM_MACOS_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@monolib_stdpaths_cf.o: $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp $(MONOLIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@monolib_graphics.o: $(srcdir)/src/mac/carbon/graphics.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/carbon/graphics.cpp
-@COND_TOOLKIT_MSW_USE_GUI_1@monolib_gsockmsw.o: $(srcdir)/src/msw/gsockmsw.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_MSW_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/gsockmsw.cpp
-
-@COND_TOOLKIT_WINCE_USE_GUI_1@monolib_gsockmsw.o: $(srcdir)/src/msw/gsockmsw.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_WINCE_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/gsockmsw.cpp
-
@COND_TOOLKIT_MSW_USE_GUI_1@monolib_dropsrc.o: $(srcdir)/src/msw/ole/dropsrc.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/ole/dropsrc.cpp
@COND_TOOLKIT_MSW_USE_GUI_1@monolib_uuid.o: $(srcdir)/src/msw/ole/uuid.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/msw/ole/uuid.cpp
-@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@monolib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONOLIB_ODEP)
-@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
-
-@COND_TOOLKIT_COCOA_USE_GUI_1@monolib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
-
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@monolib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(MONOLIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
@COND_TOOLKIT_COCOA_USE_GUI_1@monolib_utilsexc_cf.o: $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp
-@COND_TOOLKIT_X11_USE_GUI_1@monolib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_X11_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
-
-@COND_TOOLKIT_DFB_USE_GUI_1@monolib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
-
@COND_TOOLKIT_X11_USE_GUI_1@monolib_nanox.o: $(srcdir)/src/x11/nanox.c $(MONOLIB_ODEP)
@COND_TOOLKIT_X11_USE_GUI_1@ $(CCC) -c -o $@ $(MONOLIB_CFLAGS) $(srcdir)/src/x11/nanox.c
basedll_uma.o: $(srcdir)/src/mac/carbon/uma.cpp $(BASEDLL_ODEP)
$(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/carbon/uma.cpp
+@COND_PLATFORM_UNIX_1@basedll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@basedll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@basedll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@basedll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@basedll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@basedll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
@COND_PLATFORM_UNIX_1@basedll_fdiodispatcher.o: $(srcdir)/src/common/fdiodispatcher.cpp $(BASEDLL_ODEP)
@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/common/fdiodispatcher.cpp
@COND_PLATFORM_MACOS_1@basedll_cfstring.o: $(srcdir)/src/mac/corefoundation/cfstring.cpp $(BASEDLL_ODEP)
@COND_PLATFORM_MACOS_1@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/cfstring.cpp
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@basedll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@basedll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@basedll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@basedll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@basedll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@basedll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOS_1@basedll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASEDLL_ODEP)
+@COND_PLATFORM_MACOS_1@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@basedll_stdpaths_cf.o: $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp $(BASEDLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp
baselib_uma.o: $(srcdir)/src/mac/carbon/uma.cpp $(BASELIB_ODEP)
$(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/carbon/uma.cpp
+@COND_PLATFORM_UNIX_1@baselib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@baselib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@baselib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@baselib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@baselib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@baselib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
+
@COND_PLATFORM_UNIX_1@baselib_fdiodispatcher.o: $(srcdir)/src/common/fdiodispatcher.cpp $(BASELIB_ODEP)
@COND_PLATFORM_UNIX_1@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/common/fdiodispatcher.cpp
@COND_PLATFORM_MACOS_1@baselib_cfstring.o: $(srcdir)/src/mac/corefoundation/cfstring.cpp $(BASELIB_ODEP)
@COND_PLATFORM_MACOS_1@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/cfstring.cpp
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@baselib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@baselib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_COCOA@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@baselib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_GTK@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@baselib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_X11@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@baselib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_MOTIF@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@baselib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOSX_1_TOOLKIT_@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
+@COND_PLATFORM_MACOS_1@baselib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(BASELIB_ODEP)
+@COND_PLATFORM_MACOS_1@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
+
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@baselib_stdpaths_cf.o: $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp $(BASELIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC@ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/stdpaths_cf.cpp
netdll_url.o: $(srcdir)/src/common/url.cpp $(NETDLL_ODEP)
$(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/common/url.cpp
+netdll_gsockmsw.o: $(srcdir)/src/msw/gsockmsw.cpp $(NETDLL_ODEP)
+ $(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/msw/gsockmsw.cpp
+
netdll_urlmsw.o: $(srcdir)/src/msw/urlmsw.cpp $(NETDLL_ODEP)
$(CXXC) -c -o $@ $(NETDLL_CXXFLAGS) $(srcdir)/src/msw/urlmsw.cpp
netlib_url.o: $(srcdir)/src/common/url.cpp $(NETLIB_ODEP)
$(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/common/url.cpp
+netlib_gsockmsw.o: $(srcdir)/src/msw/gsockmsw.cpp $(NETLIB_ODEP)
+ $(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/msw/gsockmsw.cpp
+
netlib_urlmsw.o: $(srcdir)/src/msw/urlmsw.cpp $(NETLIB_ODEP)
$(CXXC) -c -o $@ $(NETLIB_CXXFLAGS) $(srcdir)/src/msw/urlmsw.cpp
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@coredll_graphics.o: $(srcdir)/src/mac/carbon/graphics.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/mac/carbon/graphics.cpp
-@COND_TOOLKIT_MSW_USE_GUI_1@coredll_gsockmsw.o: $(srcdir)/src/msw/gsockmsw.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_MSW_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/gsockmsw.cpp
-
-@COND_TOOLKIT_WINCE_USE_GUI_1@coredll_gsockmsw.o: $(srcdir)/src/msw/gsockmsw.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_WINCE_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/gsockmsw.cpp
-
@COND_TOOLKIT_MSW_USE_GUI_1@coredll_dropsrc.o: $(srcdir)/src/msw/ole/dropsrc.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/ole/dropsrc.cpp
@COND_TOOLKIT_MSW_USE_GUI_1@coredll_uuid.o: $(srcdir)/src/msw/ole/uuid.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/msw/ole/uuid.cpp
-@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@coredll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(COREDLL_ODEP)
-@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
-
-@COND_TOOLKIT_COCOA_USE_GUI_1@coredll_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
-
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@coredll_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(COREDLL_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
@COND_TOOLKIT_COCOA_USE_GUI_1@coredll_utilsexc_cf.o: $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp
-@COND_TOOLKIT_X11_USE_GUI_1@coredll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_X11_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
-
-@COND_TOOLKIT_DFB_USE_GUI_1@coredll_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
-
@COND_TOOLKIT_X11_USE_GUI_1@coredll_nanox.o: $(srcdir)/src/x11/nanox.c $(COREDLL_ODEP)
@COND_TOOLKIT_X11_USE_GUI_1@ $(CCC) -c -o $@ $(COREDLL_CFLAGS) $(srcdir)/src/x11/nanox.c
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@corelib_graphics.o: $(srcdir)/src/mac/carbon/graphics.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/mac/carbon/graphics.cpp
-@COND_TOOLKIT_MSW_USE_GUI_1@corelib_gsockmsw.o: $(srcdir)/src/msw/gsockmsw.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_MSW_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/gsockmsw.cpp
-
-@COND_TOOLKIT_WINCE_USE_GUI_1@corelib_gsockmsw.o: $(srcdir)/src/msw/gsockmsw.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_WINCE_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/gsockmsw.cpp
-
@COND_TOOLKIT_MSW_USE_GUI_1@corelib_dropsrc.o: $(srcdir)/src/msw/ole/dropsrc.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/ole/dropsrc.cpp
@COND_TOOLKIT_MSW_USE_GUI_1@corelib_uuid.o: $(srcdir)/src/msw/ole/uuid.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_MSW_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/msw/ole/uuid.cpp
-@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@corelib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(CORELIB_ODEP)
-@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
-
-@COND_TOOLKIT_COCOA_USE_GUI_1@corelib_gsockosx.o: $(srcdir)/src/mac/corefoundation/gsockosx.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/gsockosx.cpp
-
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@corelib_hid.o: $(srcdir)/src/mac/corefoundation/hid.cpp $(CORELIB_ODEP)
@COND_PLATFORM_MACOSX_1_TOOLKIT_MAC_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/hid.cpp
@COND_TOOLKIT_COCOA_USE_GUI_1@corelib_utilsexc_cf.o: $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_COCOA_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/mac/corefoundation/utilsexc_cf.cpp
-@COND_TOOLKIT_X11_USE_GUI_1@corelib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_X11_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
-
-@COND_TOOLKIT_DFB_USE_GUI_1@corelib_gsocketiohandler.o: $(srcdir)/src/common/gsocketiohandler.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_DFB_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/gsocketiohandler.cpp
-
@COND_TOOLKIT_X11_USE_GUI_1@corelib_nanox.o: $(srcdir)/src/x11/nanox.c $(CORELIB_ODEP)
@COND_TOOLKIT_X11_USE_GUI_1@ $(CCC) -c -o $@ $(CORELIB_CFLAGS) $(srcdir)/src/x11/nanox.c
<!-- UNIX -->
<!-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -->
<set var="BASE_UNIX_SRC" hints="files">
+ src/common/gsocketiohandler.cpp
src/common/fdiodispatcher.cpp
src/common/selectdispatcher.cpp
src/unix/appunix.cpp
</set>
<set var="BASE_UNIX_HDR" hints="files">
wx/private/fdiodispatcher.h
+ wx/private/gsocketiohandler.h
wx/private/selectdispatcher.h
wx/unix/app.h
wx/unix/apptbase.h
<!-- Used on Mac OS CarbonLib, Mac OS X wxMac base, and Mac OS X darwin base -->
<set var="BASE_COREFOUNDATION_SRC" hints="files">
src/mac/corefoundation/cfstring.cpp
+ src/mac/corefoundation/gsockosx.cpp
src/mac/corefoundation/stdpaths_cf.cpp
src/mac/corefoundation/strconv_cf.cpp
src/mac/corefoundation/utilsexc_base.cpp
<set var="NET_WIN32_SRC" hints="files">
src/msw/gsocket.cpp
+ src/msw/gsockmsw.cpp
src/msw/urlmsw.cpp
</set>
<set var="NET_WIN32_HDR" hints="files">
<set var="X11_LOWLEVEL_SRC" hints="files">
$(XWIN_LOWLEVEL_SRC)
- src/common/gsocketiohandler.cpp
src/generic/icon.cpp
src/generic/timer.cpp
src/x11/app.cpp
src/msw/gdiobj.cpp
src/msw/gdiplus.cpp
src/msw/graphics.cpp
- src/msw/gsockmsw.cpp
src/msw/icon.cpp
src/msw/imaglist.cpp
src/msw/minifram.cpp
<set var="DFB_LOWLEVEL_SRC" hints="files">
src/common/fontmgrcmn.cpp
- src/common/gsocketiohandler.cpp
src/generic/caret.cpp
src/generic/colour.cpp
src/generic/icon.cpp
<set var="MAC_OSX_LOWLEVEL_SRC" hints="files">
<!-- Shared wxMac and wxCocoa files -->
- src/mac/corefoundation/gsockosx.cpp
src/mac/corefoundation/hid.cpp
src/mac/corefoundation/utilsexc_cf.cpp
</set>
<set var="COCOA_LOWLEVEL_SRC" hints="files">
<!-- Shared wxMac and wxCocoa files -->
- src/mac/corefoundation/gsockosx.cpp
src/mac/corefoundation/hid.cpp
src/mac/corefoundation/utilsexc_cf.cpp
</set>
$(OBJS)\monodll_socket.obj \
$(OBJS)\monodll_url.obj \
$(OBJS)\monodll_gsocket.obj \
+ $(OBJS)\monodll_gsockmsw.obj \
$(OBJS)\monodll_urlmsw.obj \
$(____MONOLIB_GUI_SRC_FILENAMES_OBJECTS) \
$(OBJS)\monodll_xml.obj \
$(OBJS)\monolib_socket.obj \
$(OBJS)\monolib_url.obj \
$(OBJS)\monolib_gsocket.obj \
+ $(OBJS)\monolib_gsockmsw.obj \
$(OBJS)\monolib_urlmsw.obj \
$(____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS) \
$(OBJS)\monolib_xml.obj \
$(OBJS)\netdll_socket.obj \
$(OBJS)\netdll_url.obj \
$(OBJS)\netdll_gsocket.obj \
+ $(OBJS)\netdll_gsockmsw.obj \
$(OBJS)\netdll_urlmsw.obj
NETLIB_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
$(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(OBJS)\netlib_socket.obj \
$(OBJS)\netlib_url.obj \
$(OBJS)\netlib_gsocket.obj \
+ $(OBJS)\netlib_gsockmsw.obj \
$(OBJS)\netlib_urlmsw.obj
COREDLL_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
$(__OPTIMIZEFLAG) $(__THREADSFLAG) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(OBJS)\monodll_gdiobj.obj \
$(OBJS)\monodll_gdiplus.obj \
$(OBJS)\monodll_graphics.obj \
- $(OBJS)\monodll_gsockmsw.obj \
$(OBJS)\monodll_icon.obj \
$(OBJS)\monodll_imaglist.obj \
$(OBJS)\monodll_minifram.obj \
$(OBJS)\monodll_gdiobj.obj \
$(OBJS)\monodll_gdiplus.obj \
$(OBJS)\monodll_graphics.obj \
- $(OBJS)\monodll_gsockmsw.obj \
$(OBJS)\monodll_icon.obj \
$(OBJS)\monodll_imaglist.obj \
$(OBJS)\monodll_minifram.obj \
$(OBJS)\monolib_gdiobj.obj \
$(OBJS)\monolib_gdiplus.obj \
$(OBJS)\monolib_graphics.obj \
- $(OBJS)\monolib_gsockmsw.obj \
$(OBJS)\monolib_icon.obj \
$(OBJS)\monolib_imaglist.obj \
$(OBJS)\monolib_minifram.obj \
$(OBJS)\monolib_gdiobj.obj \
$(OBJS)\monolib_gdiplus.obj \
$(OBJS)\monolib_graphics.obj \
- $(OBJS)\monolib_gsockmsw.obj \
$(OBJS)\monolib_icon.obj \
$(OBJS)\monolib_imaglist.obj \
$(OBJS)\monolib_minifram.obj \
$(OBJS)\coredll_gdiobj.obj \
$(OBJS)\coredll_gdiplus.obj \
$(OBJS)\coredll_graphics.obj \
- $(OBJS)\coredll_gsockmsw.obj \
$(OBJS)\coredll_icon.obj \
$(OBJS)\coredll_imaglist.obj \
$(OBJS)\coredll_minifram.obj \
$(OBJS)\coredll_gdiobj.obj \
$(OBJS)\coredll_gdiplus.obj \
$(OBJS)\coredll_graphics.obj \
- $(OBJS)\coredll_gsockmsw.obj \
$(OBJS)\coredll_icon.obj \
$(OBJS)\coredll_imaglist.obj \
$(OBJS)\coredll_minifram.obj \
$(OBJS)\corelib_gdiobj.obj \
$(OBJS)\corelib_gdiplus.obj \
$(OBJS)\corelib_graphics.obj \
- $(OBJS)\corelib_gsockmsw.obj \
$(OBJS)\corelib_icon.obj \
$(OBJS)\corelib_imaglist.obj \
$(OBJS)\corelib_minifram.obj \
$(OBJS)\corelib_gdiobj.obj \
$(OBJS)\corelib_gdiplus.obj \
$(OBJS)\corelib_graphics.obj \
- $(OBJS)\corelib_gsockmsw.obj \
$(OBJS)\corelib_icon.obj \
$(OBJS)\corelib_imaglist.obj \
$(OBJS)\corelib_minifram.obj \
$(OBJS)\monodll_gsocket.obj: ..\..\src\msw\gsocket.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
+$(OBJS)\monodll_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
+ $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
+
$(OBJS)\monodll_urlmsw.obj: ..\..\src\msw\urlmsw.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\monodll_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
- $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_icon.obj: ..\..\src\msw\icon.cpp
$(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) $**
$(OBJS)\monolib_gsocket.obj: ..\..\src\msw\gsocket.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
+$(OBJS)\monolib_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
+ $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
+
$(OBJS)\monolib_urlmsw.obj: ..\..\src\msw\urlmsw.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\monolib_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
- $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_icon.obj: ..\..\src\msw\icon.cpp
$(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) $**
$(OBJS)\netdll_gsocket.obj: ..\..\src\msw\gsocket.cpp
$(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) $**
+$(OBJS)\netdll_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
+ $(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) $**
+
$(OBJS)\netdll_urlmsw.obj: ..\..\src\msw\urlmsw.cpp
$(CXX) -q -c -P -o$@ $(NETDLL_CXXFLAGS) $**
$(OBJS)\netlib_gsocket.obj: ..\..\src\msw\gsocket.cpp
$(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) $**
+$(OBJS)\netlib_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
+ $(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) $**
+
$(OBJS)\netlib_urlmsw.obj: ..\..\src\msw\urlmsw.cpp
$(CXX) -q -c -P -o$@ $(NETLIB_CXXFLAGS) $**
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) $**
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\coredll_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
- $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) $**
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\coredll_icon.obj: ..\..\src\msw\icon.cpp
$(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) $**
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) $**
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\corelib_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
- $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) $**
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\corelib_icon.obj: ..\..\src\msw\icon.cpp
$(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) $**
$(OBJS)\monodll_socket.o \
$(OBJS)\monodll_url.o \
$(OBJS)\monodll_gsocket.o \
+ $(OBJS)\monodll_gsockmsw.o \
$(OBJS)\monodll_urlmsw.o \
$(____MONOLIB_GUI_SRC_FILENAMES_OBJECTS) \
$(OBJS)\monodll_xml.o \
$(OBJS)\monolib_socket.o \
$(OBJS)\monolib_url.o \
$(OBJS)\monolib_gsocket.o \
+ $(OBJS)\monolib_gsockmsw.o \
$(OBJS)\monolib_urlmsw.o \
$(____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS) \
$(OBJS)\monolib_xml.o \
$(OBJS)\netdll_socket.o \
$(OBJS)\netdll_url.o \
$(OBJS)\netdll_gsocket.o \
+ $(OBJS)\netdll_gsockmsw.o \
$(OBJS)\netdll_urlmsw.o
NETLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) $(GCCFLAGS) \
-DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
$(OBJS)\netlib_socket.o \
$(OBJS)\netlib_url.o \
$(OBJS)\netlib_gsocket.o \
+ $(OBJS)\netlib_gsockmsw.o \
$(OBJS)\netlib_urlmsw.o
COREDLL_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \
$(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(OBJS)\monodll_gdiobj.o \
$(OBJS)\monodll_gdiplus.o \
$(OBJS)\monodll_graphics.o \
- $(OBJS)\monodll_gsockmsw.o \
$(OBJS)\monodll_icon.o \
$(OBJS)\monodll_imaglist.o \
$(OBJS)\monodll_minifram.o \
$(OBJS)\monodll_gdiobj.o \
$(OBJS)\monodll_gdiplus.o \
$(OBJS)\monodll_graphics.o \
- $(OBJS)\monodll_gsockmsw.o \
$(OBJS)\monodll_icon.o \
$(OBJS)\monodll_imaglist.o \
$(OBJS)\monodll_minifram.o \
$(OBJS)\monolib_gdiobj.o \
$(OBJS)\monolib_gdiplus.o \
$(OBJS)\monolib_graphics.o \
- $(OBJS)\monolib_gsockmsw.o \
$(OBJS)\monolib_icon.o \
$(OBJS)\monolib_imaglist.o \
$(OBJS)\monolib_minifram.o \
$(OBJS)\monolib_gdiobj.o \
$(OBJS)\monolib_gdiplus.o \
$(OBJS)\monolib_graphics.o \
- $(OBJS)\monolib_gsockmsw.o \
$(OBJS)\monolib_icon.o \
$(OBJS)\monolib_imaglist.o \
$(OBJS)\monolib_minifram.o \
$(OBJS)\coredll_gdiobj.o \
$(OBJS)\coredll_gdiplus.o \
$(OBJS)\coredll_graphics.o \
- $(OBJS)\coredll_gsockmsw.o \
$(OBJS)\coredll_icon.o \
$(OBJS)\coredll_imaglist.o \
$(OBJS)\coredll_minifram.o \
$(OBJS)\coredll_gdiobj.o \
$(OBJS)\coredll_gdiplus.o \
$(OBJS)\coredll_graphics.o \
- $(OBJS)\coredll_gsockmsw.o \
$(OBJS)\coredll_icon.o \
$(OBJS)\coredll_imaglist.o \
$(OBJS)\coredll_minifram.o \
$(OBJS)\corelib_gdiobj.o \
$(OBJS)\corelib_gdiplus.o \
$(OBJS)\corelib_graphics.o \
- $(OBJS)\corelib_gsockmsw.o \
$(OBJS)\corelib_icon.o \
$(OBJS)\corelib_imaglist.o \
$(OBJS)\corelib_minifram.o \
$(OBJS)\corelib_gdiobj.o \
$(OBJS)\corelib_gdiplus.o \
$(OBJS)\corelib_graphics.o \
- $(OBJS)\corelib_gsockmsw.o \
$(OBJS)\corelib_icon.o \
$(OBJS)\corelib_imaglist.o \
$(OBJS)\corelib_minifram.o \
$(OBJS)\monodll_gsocket.o: ../../src/msw/gsocket.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
+$(OBJS)\monodll_gsockmsw.o: ../../src/msw/gsockmsw.cpp
+ $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\monodll_urlmsw.o: ../../src/msw/urlmsw.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
endif
-ifeq ($(USE_GUI),1)
-$(OBJS)\monodll_gsockmsw.o: ../../src/msw/gsockmsw.cpp
- $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
-endif
-
ifeq ($(USE_GUI),1)
$(OBJS)\monodll_icon.o: ../../src/msw/icon.cpp
$(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monolib_gsocket.o: ../../src/msw/gsocket.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
+$(OBJS)\monolib_gsockmsw.o: ../../src/msw/gsockmsw.cpp
+ $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\monolib_urlmsw.o: ../../src/msw/urlmsw.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
endif
-ifeq ($(USE_GUI),1)
-$(OBJS)\monolib_gsockmsw.o: ../../src/msw/gsockmsw.cpp
- $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
-endif
-
ifeq ($(USE_GUI),1)
$(OBJS)\monolib_icon.o: ../../src/msw/icon.cpp
$(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\netdll_gsocket.o: ../../src/msw/gsocket.cpp
$(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $<
+$(OBJS)\netdll_gsockmsw.o: ../../src/msw/gsockmsw.cpp
+ $(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\netdll_urlmsw.o: ../../src/msw/urlmsw.cpp
$(CXX) -c -o $@ $(NETDLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\netlib_gsocket.o: ../../src/msw/gsocket.cpp
$(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $<
+$(OBJS)\netlib_gsockmsw.o: ../../src/msw/gsockmsw.cpp
+ $(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\netlib_urlmsw.o: ../../src/msw/urlmsw.cpp
$(CXX) -c -o $@ $(NETLIB_CXXFLAGS) $(CPPDEPS) $<
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
endif
-ifeq ($(USE_GUI),1)
-$(OBJS)\coredll_gsockmsw.o: ../../src/msw/gsockmsw.cpp
- $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
-endif
-
ifeq ($(USE_GUI),1)
$(OBJS)\coredll_icon.o: ../../src/msw/icon.cpp
$(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
endif
-ifeq ($(USE_GUI),1)
-$(OBJS)\corelib_gsockmsw.o: ../../src/msw/gsockmsw.cpp
- $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
-endif
-
ifeq ($(USE_GUI),1)
$(OBJS)\corelib_icon.o: ../../src/msw/icon.cpp
$(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\monodll_socket.obj \
$(OBJS)\monodll_url.obj \
$(OBJS)\monodll_gsocket.obj \
+ $(OBJS)\monodll_gsockmsw.obj \
$(OBJS)\monodll_urlmsw.obj \
$(____MONOLIB_GUI_SRC_FILENAMES_OBJECTS) \
$(OBJS)\monodll_xml.obj \
$(OBJS)\monolib_socket.obj \
$(OBJS)\monolib_url.obj \
$(OBJS)\monolib_gsocket.obj \
+ $(OBJS)\monolib_gsockmsw.obj \
$(OBJS)\monolib_urlmsw.obj \
$(____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS) \
$(OBJS)\monolib_xml.obj \
$(OBJS)\netdll_socket.obj \
$(OBJS)\netdll_url.obj \
$(OBJS)\netdll_gsocket.obj \
+ $(OBJS)\netdll_gsockmsw.obj \
$(OBJS)\netdll_urlmsw.obj
NETLIB_CXXFLAGS = /M$(__RUNTIME_LIBS_167)$(__DEBUGRUNTIME) /DWIN32 \
$(__DEBUGINFO) \
$(OBJS)\netlib_socket.obj \
$(OBJS)\netlib_url.obj \
$(OBJS)\netlib_gsocket.obj \
+ $(OBJS)\netlib_gsockmsw.obj \
$(OBJS)\netlib_urlmsw.obj
COREDLL_CXXFLAGS = /M$(__RUNTIME_LIBS_181)$(__DEBUGRUNTIME) /DWIN32 \
$(__DEBUGINFO) \
$(OBJS)\monodll_gdiobj.obj \
$(OBJS)\monodll_gdiplus.obj \
$(OBJS)\monodll_graphics.obj \
- $(OBJS)\monodll_gsockmsw.obj \
$(OBJS)\monodll_icon.obj \
$(OBJS)\monodll_imaglist.obj \
$(OBJS)\monodll_minifram.obj \
$(OBJS)\monodll_gdiobj.obj \
$(OBJS)\monodll_gdiplus.obj \
$(OBJS)\monodll_graphics.obj \
- $(OBJS)\monodll_gsockmsw.obj \
$(OBJS)\monodll_icon.obj \
$(OBJS)\monodll_imaglist.obj \
$(OBJS)\monodll_minifram.obj \
$(OBJS)\monolib_gdiobj.obj \
$(OBJS)\monolib_gdiplus.obj \
$(OBJS)\monolib_graphics.obj \
- $(OBJS)\monolib_gsockmsw.obj \
$(OBJS)\monolib_icon.obj \
$(OBJS)\monolib_imaglist.obj \
$(OBJS)\monolib_minifram.obj \
$(OBJS)\monolib_gdiobj.obj \
$(OBJS)\monolib_gdiplus.obj \
$(OBJS)\monolib_graphics.obj \
- $(OBJS)\monolib_gsockmsw.obj \
$(OBJS)\monolib_icon.obj \
$(OBJS)\monolib_imaglist.obj \
$(OBJS)\monolib_minifram.obj \
$(OBJS)\coredll_gdiobj.obj \
$(OBJS)\coredll_gdiplus.obj \
$(OBJS)\coredll_graphics.obj \
- $(OBJS)\coredll_gsockmsw.obj \
$(OBJS)\coredll_icon.obj \
$(OBJS)\coredll_imaglist.obj \
$(OBJS)\coredll_minifram.obj \
$(OBJS)\coredll_gdiobj.obj \
$(OBJS)\coredll_gdiplus.obj \
$(OBJS)\coredll_graphics.obj \
- $(OBJS)\coredll_gsockmsw.obj \
$(OBJS)\coredll_icon.obj \
$(OBJS)\coredll_imaglist.obj \
$(OBJS)\coredll_minifram.obj \
$(OBJS)\corelib_gdiobj.obj \
$(OBJS)\corelib_gdiplus.obj \
$(OBJS)\corelib_graphics.obj \
- $(OBJS)\corelib_gsockmsw.obj \
$(OBJS)\corelib_icon.obj \
$(OBJS)\corelib_imaglist.obj \
$(OBJS)\corelib_minifram.obj \
$(OBJS)\corelib_gdiobj.obj \
$(OBJS)\corelib_gdiplus.obj \
$(OBJS)\corelib_graphics.obj \
- $(OBJS)\corelib_gsockmsw.obj \
$(OBJS)\corelib_icon.obj \
$(OBJS)\corelib_imaglist.obj \
$(OBJS)\corelib_minifram.obj \
$(OBJS)\monodll_gsocket.obj: ..\..\src\msw\gsocket.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
+$(OBJS)\monodll_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
+
$(OBJS)\monodll_urlmsw.obj: ..\..\src\msw\urlmsw.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\monodll_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\monodll_icon.obj: ..\..\src\msw\icon.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) $**
$(OBJS)\monolib_gsocket.obj: ..\..\src\msw\gsocket.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
+$(OBJS)\monolib_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
+
$(OBJS)\monolib_urlmsw.obj: ..\..\src\msw\urlmsw.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\monolib_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\monolib_icon.obj: ..\..\src\msw\icon.cpp
$(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) $**
$(OBJS)\netdll_gsocket.obj: ..\..\src\msw\gsocket.cpp
$(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) $**
+$(OBJS)\netdll_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) $**
+
$(OBJS)\netdll_urlmsw.obj: ..\..\src\msw\urlmsw.cpp
$(CXX) /c /nologo /TP /Fo$@ $(NETDLL_CXXFLAGS) $**
$(OBJS)\netlib_gsocket.obj: ..\..\src\msw\gsocket.cpp
$(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) $**
+$(OBJS)\netlib_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) $**
+
$(OBJS)\netlib_urlmsw.obj: ..\..\src\msw\urlmsw.cpp
$(CXX) /c /nologo /TP /Fo$@ $(NETLIB_CXXFLAGS) $**
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) $**
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\coredll_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) $**
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\coredll_icon.obj: ..\..\src\msw\icon.cpp
$(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) $**
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) $**
!endif
-!if "$(USE_GUI)" == "1"
-$(OBJS)\corelib_gsockmsw.obj: ..\..\src\msw\gsockmsw.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) $**
-!endif
-
!if "$(USE_GUI)" == "1"
$(OBJS)\corelib_icon.obj: ..\..\src\msw\icon.cpp
$(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) $**
$(OBJS)\monodll_gdiobj.obj &
$(OBJS)\monodll_gdiplus.obj &
$(OBJS)\monodll_graphics.obj &
- $(OBJS)\monodll_gsockmsw.obj &
$(OBJS)\monodll_icon.obj &
$(OBJS)\monodll_imaglist.obj &
$(OBJS)\monodll_minifram.obj &
$(OBJS)\monodll_gdiobj.obj &
$(OBJS)\monodll_gdiplus.obj &
$(OBJS)\monodll_graphics.obj &
- $(OBJS)\monodll_gsockmsw.obj &
$(OBJS)\monodll_icon.obj &
$(OBJS)\monodll_imaglist.obj &
$(OBJS)\monodll_minifram.obj &
$(OBJS)\monolib_gdiobj.obj &
$(OBJS)\monolib_gdiplus.obj &
$(OBJS)\monolib_graphics.obj &
- $(OBJS)\monolib_gsockmsw.obj &
$(OBJS)\monolib_icon.obj &
$(OBJS)\monolib_imaglist.obj &
$(OBJS)\monolib_minifram.obj &
$(OBJS)\monolib_gdiobj.obj &
$(OBJS)\monolib_gdiplus.obj &
$(OBJS)\monolib_graphics.obj &
- $(OBJS)\monolib_gsockmsw.obj &
$(OBJS)\monolib_icon.obj &
$(OBJS)\monolib_imaglist.obj &
$(OBJS)\monolib_minifram.obj &
$(OBJS)\coredll_gdiobj.obj &
$(OBJS)\coredll_gdiplus.obj &
$(OBJS)\coredll_graphics.obj &
- $(OBJS)\coredll_gsockmsw.obj &
$(OBJS)\coredll_icon.obj &
$(OBJS)\coredll_imaglist.obj &
$(OBJS)\coredll_minifram.obj &
$(OBJS)\coredll_gdiobj.obj &
$(OBJS)\coredll_gdiplus.obj &
$(OBJS)\coredll_graphics.obj &
- $(OBJS)\coredll_gsockmsw.obj &
$(OBJS)\coredll_icon.obj &
$(OBJS)\coredll_imaglist.obj &
$(OBJS)\coredll_minifram.obj &
$(OBJS)\corelib_gdiobj.obj &
$(OBJS)\corelib_gdiplus.obj &
$(OBJS)\corelib_graphics.obj &
- $(OBJS)\corelib_gsockmsw.obj &
$(OBJS)\corelib_icon.obj &
$(OBJS)\corelib_imaglist.obj &
$(OBJS)\corelib_minifram.obj &
$(OBJS)\corelib_gdiobj.obj &
$(OBJS)\corelib_gdiplus.obj &
$(OBJS)\corelib_graphics.obj &
- $(OBJS)\corelib_gsockmsw.obj &
$(OBJS)\corelib_icon.obj &
$(OBJS)\corelib_imaglist.obj &
$(OBJS)\corelib_minifram.obj &
$(OBJS)\monodll_socket.obj &
$(OBJS)\monodll_url.obj &
$(OBJS)\monodll_gsocket.obj &
+ $(OBJS)\monodll_gsockmsw.obj &
$(OBJS)\monodll_urlmsw.obj &
$(____MONOLIB_GUI_SRC_FILENAMES_OBJECTS) &
$(OBJS)\monodll_xml.obj &
$(OBJS)\monolib_socket.obj &
$(OBJS)\monolib_url.obj &
$(OBJS)\monolib_gsocket.obj &
+ $(OBJS)\monolib_gsockmsw.obj &
$(OBJS)\monolib_urlmsw.obj &
$(____MONOLIB_GUI_SRC_FILENAMES_1_OBJECTS) &
$(OBJS)\monolib_xml.obj &
$(OBJS)\netdll_socket.obj &
$(OBJS)\netdll_url.obj &
$(OBJS)\netdll_gsocket.obj &
+ $(OBJS)\netdll_gsockmsw.obj &
$(OBJS)\netdll_urlmsw.obj
NETLIB_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
$(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
$(OBJS)\netlib_socket.obj &
$(OBJS)\netlib_url.obj &
$(OBJS)\netlib_gsocket.obj &
+ $(OBJS)\netlib_gsockmsw.obj &
$(OBJS)\netlib_urlmsw.obj
COREDLL_CXXFLAGS = -bd $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
$(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
$(OBJS)\monodll_gsocket.obj : .AUTODEPEND ..\..\src\msw\gsocket.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
+$(OBJS)\monodll_gsockmsw.obj : .AUTODEPEND ..\..\src\msw\gsockmsw.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
+
$(OBJS)\monodll_urlmsw.obj : .AUTODEPEND ..\..\src\msw\urlmsw.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
!endif
-!ifeq USE_GUI 1
-$(OBJS)\monodll_gsockmsw.obj : .AUTODEPEND ..\..\src\msw\gsockmsw.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
-!endif
-
!ifeq USE_GUI 1
$(OBJS)\monodll_icon.obj : .AUTODEPEND ..\..\src\msw\icon.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<
$(OBJS)\monolib_gsocket.obj : .AUTODEPEND ..\..\src\msw\gsocket.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
+$(OBJS)\monolib_gsockmsw.obj : .AUTODEPEND ..\..\src\msw\gsockmsw.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
+
$(OBJS)\monolib_urlmsw.obj : .AUTODEPEND ..\..\src\msw\urlmsw.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
!endif
-!ifeq USE_GUI 1
-$(OBJS)\monolib_gsockmsw.obj : .AUTODEPEND ..\..\src\msw\gsockmsw.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
-!endif
-
!ifeq USE_GUI 1
$(OBJS)\monolib_icon.obj : .AUTODEPEND ..\..\src\msw\icon.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<
$(OBJS)\netdll_gsocket.obj : .AUTODEPEND ..\..\src\msw\gsocket.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $<
+$(OBJS)\netdll_gsockmsw.obj : .AUTODEPEND ..\..\src\msw\gsockmsw.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $<
+
$(OBJS)\netdll_urlmsw.obj : .AUTODEPEND ..\..\src\msw\urlmsw.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(NETDLL_CXXFLAGS) $<
$(OBJS)\netlib_gsocket.obj : .AUTODEPEND ..\..\src\msw\gsocket.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $<
+$(OBJS)\netlib_gsockmsw.obj : .AUTODEPEND ..\..\src\msw\gsockmsw.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $<
+
$(OBJS)\netlib_urlmsw.obj : .AUTODEPEND ..\..\src\msw\urlmsw.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(NETLIB_CXXFLAGS) $<
$(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
!endif
-!ifeq USE_GUI 1
-$(OBJS)\coredll_gsockmsw.obj : .AUTODEPEND ..\..\src\msw\gsockmsw.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
-!endif
-
!ifeq USE_GUI 1
$(OBJS)\coredll_icon.obj : .AUTODEPEND ..\..\src\msw\icon.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<
$(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
!endif
-!ifeq USE_GUI 1
-$(OBJS)\corelib_gsockmsw.obj : .AUTODEPEND ..\..\src\msw\gsockmsw.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
-!endif
-
!ifeq USE_GUI 1
$(OBJS)\corelib_icon.obj : .AUTODEPEND ..\..\src\msw\icon.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<
# End Source File\r
# Begin Source File\r
\r
-SOURCE=..\..\src\msw\gsockmsw.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
SOURCE=..\..\src\msw\helpchm.cpp\r
# End Source File\r
# Begin Source File\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=..\..\src\msw\gsockmsw.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=..\..\src\msw\urlmsw.cpp\r
# End Source File\r
# Begin Source File\r
fi
else
SAMPLES_SUBDIRS="console"
+ if test "$wxUSE_SOCKETS" = "yes" ; then
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sockets"
+ fi
fi
dnl don't take all samples/utils, just those which build with
dnl wxBase
if test ${subdir} = "samples"; then
- makefiles="samples/Makefile.in samples/console/Makefile.in"
+ dnl only take those samples which compile in the current
+ dnl configuration and which exist
+ makefiles="samples/Makefile.in $makefiles"
+ for sample in `echo $SAMPLES_SUBDIRS`; do
+ if test -d $srcdir/samples/$sample; then
+ makefiles="samples/$sample/Makefile.in $makefiles"
+ fi
+ done
elif test ${subdir} = "utils"; then
makefiles=""
for util in HelpGen tex2rtf ; do
- wxWidgets may now use either wchar_t (UTF-16/32) or UTF-8 internally,
depending on what is optimal for the target platform.
-- Events loops and timers can now be used in wxBase, without GUI.
+- Events loops, timers and sockets can now be used in wxBase, without GUI.
2.9.0
class WXDLLIMPEXP_FWD_BASE wxTimer;
class WXDLLIMPEXP_FWD_BASE wxTimerImpl;
-class GSocketGUIFunctionsTable;
+class GSocketManager;
// ----------------------------------------------------------------------------
virtual void RemoveFromPendingDelete(wxObject *object) = 0;
#if wxUSE_SOCKETS
- // return table of GUI callbacks for GSocket code or NULL in wxBase. This
- // is needed because networking classes are in their own library and so
- // they can't directly call GUI functions (the same net library can be
- // used in both GUI and base apps). To complicate it further, GUI library
- // ("wxCore") doesn't depend on networking library and so only a functions
- // table can be passed around
- virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable() = 0;
+ // return socket manager: this is usually different for console and GUI
+ // applications (although some ports use the same implementation for both)
+ virtual GSocketManager *GetSocketManager() = 0;
#endif
// create a new, port specific, instance of the event loop used by wxApp
virtual wxFontMapper *CreateFontMapper();
#endif // wxUSE_FONTMAP
virtual wxRendererNative *CreateRenderer();
-#if wxUSE_SOCKETS
- virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
-#endif
#ifdef __WXDEBUG__
virtual bool ShowAssertDialog(const wxString& msg);
virtual wxFontMapper *CreateFontMapper();
#endif // wxUSE_FONTMAP
virtual wxRendererNative *CreateRenderer();
-#if wxUSE_SOCKETS
- virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
-#endif
#ifdef __WXDEBUG__
virtual bool ShowAssertDialog(const wxString& msg);
* Project: GSocket (Generic Socket)
* Name: gsocket.h
* Author: Guilhem Lavaux
- * Guillermo Rodriguez Garcia <guille@iies.es> (maintainer)
+ * Guillermo Rodriguez Garcia <guille@iies.es>
* Copyright: (c) Guilhem Lavaux
+ * (c) 2007 Vadim Zeitlin <vadim@wxwidgets.org>
* Licence: wxWindows Licence
* Purpose: GSocket include file (system independent)
* CVSID: $Id$
* -------------------------------------------------------------------------
*/
-#ifndef __GSOCKET_H
-#define __GSOCKET_H
+#ifndef _WX_GSOCKET_H_
+#define _WX_GSOCKET_H_
-#ifndef __GSOCKET_STANDALONE__
#include "wx/defs.h"
-#include "wx/dlimpexp.h" /* for WXDLLIMPEXP_NET */
-
-#endif
+#if wxUSE_SOCKETS
-#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
+#include "wx/dlimpexp.h" /* for WXDLLIMPEXP_NET */
#include <stddef.h>
#include <stdlib.h>
#endif
-class GSocket;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
typedef struct _GAddress GAddress;
-typedef enum {
+enum GAddressType
+{
GSOCK_NOFAMILY = 0,
GSOCK_INET,
GSOCK_INET6,
GSOCK_UNIX
-} GAddressType;
+};
-typedef enum {
+enum GSocketStream
+{
GSOCK_STREAMED,
GSOCK_UNSTREAMED
-} GSocketStream;
+};
-typedef enum {
+enum GSocketError
+{
GSOCK_NOERROR = 0,
GSOCK_INVOP,
GSOCK_IOERR,
GSOCK_TIMEDOUT,
GSOCK_MEMERR,
GSOCK_OPTERR
-} GSocketError;
+};
/* See below for an explanation on how events work.
*/
-typedef enum {
+enum GSocketEvent
+{
GSOCK_INPUT = 0,
GSOCK_OUTPUT = 1,
GSOCK_CONNECTION = 2,
GSOCK_LOST = 3,
GSOCK_MAX_EVENT = 4
-} GSocketEvent;
+};
-enum {
+enum
+{
GSOCK_INPUT_FLAG = 1 << GSOCK_INPUT,
GSOCK_OUTPUT_FLAG = 1 << GSOCK_OUTPUT,
GSOCK_CONNECTION_FLAG = 1 << GSOCK_CONNECTION,
typedef int GSocketEventFlags;
+class GSocket;
+
typedef void (*GSocketCallback)(GSocket *socket, GSocketEvent event,
char *cdata);
-
-/* Functions tables for internal use by GSocket code: */
-
-/* Actually this is a misnomer now, but reusing this name means I don't
- have to ifdef app traits or common socket code */
-class GSocketGUIFunctionsTable
+/*
+ Class providing hooks abstracting the differences between console and GUI
+ applications for socket code.
+
+ We also have different implementations of this class for different platforms
+ allowing us to keep more things in the common code but the main reason for
+ its existence is that we want the same socket code work differently
+ depending on whether it's used from a console or a GUI program. This is
+ achieved by implementing the virtual methods of this class differently in
+ the objects returned by wxConsoleAppTraits::GetSocketFunctionsTable() and
+ the same method in wxGUIAppTraits.
+ */
+class GSocketManager
{
public:
- // needed since this class declares virtual members
- virtual ~GSocketGUIFunctionsTable() { }
+ // set the manager to use, we don't take ownership of it
+ //
+ // this should be called before GSocket_Init(), i.e. before the first
+ // wxSocket object is created, otherwise the manager returned by
+ // wxAppTraits::GetSocketManager() will be used
+ static void Set(GSocketManager *manager);
+
+ // return the manager to use
+ //
+ // this initializes the manager at first use
+ static GSocketManager *Get()
+ {
+ if ( !ms_manager )
+ Init();
+
+ return ms_manager;
+ }
+
+ // called before the first wxSocket is created and should do the
+ // initializations needed in order to use the network
+ //
+ // return true if initialized successfully
virtual bool OnInit() = 0;
+
+ // undo the initializations of OnInit()
virtual void OnExit() = 0;
- virtual bool CanUseEventLoop() = 0;
+
+
+ // do manager-specific socket initializations (and undo it): this is called
+ // in the beginning/end of the socket initialization/destruction
virtual bool Init_Socket(GSocket *socket) = 0;
virtual void Destroy_Socket(GSocket *socket) = 0;
-#ifndef __WINDOWS__
+
virtual void Install_Callback(GSocket *socket, GSocketEvent event) = 0;
virtual void Uninstall_Callback(GSocket *socket, GSocketEvent event) = 0;
-#endif
+
virtual void Enable_Events(GSocket *socket) = 0;
virtual void Disable_Events(GSocket *socket) = 0;
+
+ virtual ~GSocketManager() { }
+
+private:
+ // get the manager to use if we don't have it yet
+ static void Init();
+
+ static GSocketManager *ms_manager;
};
+#if defined(__WINDOWS__)
+ #include "wx/msw/gsockmsw.h"
+#else
+ #include "wx/unix/gsockunx.h"
+#endif
-/* Global initializers */
-/* Sets GUI functions callbacks. Must be called *before* GSocket_Init
- if the app uses async sockets. */
-void GSocket_SetGUIFunctions(GSocketGUIFunctionsTable *guifunc);
+/* Global initializers */
-/* GSocket_Init() must be called at the beginning */
-int GSocket_Init(void);
+/* GSocket_Init() must be called at the beginning (but after calling
+ * GSocketManager::Set() if a custom manager should be used) */
+bool GSocket_Init();
/* GSocket_Cleanup() must be called at the end */
-void GSocket_Cleanup(void);
+void GSocket_Cleanup();
/* Constructors / Destructors */
-GSocket *GSocket_new(void);
+GSocket *GSocket_new();
/* GAddress */
-GAddress *GAddress_new(void);
+GAddress *GAddress_new();
GAddress *GAddress_copy(GAddress *address);
void GAddress_destroy(GAddress *address);
GSocketError GAddress_UNIX_SetPath(GAddress *address, const char *path);
GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-# if defined(__WINDOWS__)
-# include "wx/msw/gsockmsw.h"
-# else
-# include "wx/unix/gsockunx.h"
-# endif
-
-#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
+#endif /* wxUSE_SOCKETS */
-#endif /* __GSOCKET_H */
+#endif /* _WX_GSOCKET_H_ */
#define _WX_PRIVATE_H_
#include "wx/defs.h"
-#include "X11/Xlib.h"
+#include <X11/Xlib.h>
+#include <Xm/Xm.h>
#include "wx/evtloop.h"
class WXDLLIMPEXP_FWD_CORE wxFont;
// the GUI code, WAIT_OBJECT_0 + 1 if a Windows message arrived
virtual WXDWORD WaitForThread(WXHANDLE hThread) = 0;
+
+ // wxSocket support
+ // ----------------
+
+#if wxUSE_SOCKETS
+ // this function is used by wxNet library to set the default socket manager
+ // to use: doing it like this allows us to keep all socket-related code in
+ // wxNet instead of having to pull it in wxBase itself as we'd have to do
+ // if we really implemented GSocketManager here
+ //
+ // we don't take ownership of this pointer, it should have a lifetime
+ // greater than that of any socket (e.g. be a pointer to a static object)
+ static void SetDefaultSocketManager(GSocketManager *manager)
+ {
+ ms_manager = manager;
+ }
+
+ virtual GSocketManager *GetSocketManager() { return ms_manager; }
+#endif // wxUSE_SOCKETS
+
protected:
// implementation of WaitForThread() for the console applications which is
// also used by the GUI code if it doesn't [yet|already} dispatch events
WXDWORD DoSimpleWaitForThread(WXHANDLE hThread);
+
+ static GSocketManager *ms_manager;
};
#endif // _WX_MSW_APPTBASE_H_
* -------------------------------------------------------------------------
*/
-#ifndef __GSOCK_MSW_H
-#define __GSOCK_MSW_H
-
-#ifndef __GSOCKET_STANDALONE__
-#include "wx/setup.h"
-#endif
-
-#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
-
-#ifndef __GSOCKET_STANDALONE__
-#include "wx/gsocket.h"
-#else
-#include "gsocket.h"
-#endif
+#ifndef _WX_MSW_GSOCKMSW_H_
+#define _WX_MSW_GSOCKMSW_H_
#include "wx/msw/wrapwin.h"
#include <winsock.h>
#endif
-class GSocketGUIFunctionsTableConcrete: public GSocketGUIFunctionsTable
-{
-public:
- virtual bool OnInit();
- virtual void OnExit();
- virtual bool CanUseEventLoop();
- virtual bool Init_Socket(GSocket *socket);
- virtual void Destroy_Socket(GSocket *socket);
- virtual void Enable_Events(GSocket *socket);
- virtual void Disable_Events(GSocket *socket);
-};
-
/* Definition of GSocket */
class GSocket
{
GAddress *GetPeer();
GSocketError SetServer();
GSocket *WaitConnection();
+ // not used under MSW
+ void Notify(bool) { }
bool SetReusable();
bool SetBroadcast();
bool DontDoBind();
int m_msgnumber;
};
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* Definition of GAddress */
struct _GAddress
{
GSocketError _GAddress_Init_INET(GAddress *address);
GSocketError _GAddress_Init_UNIX(GAddress *address);
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
-
-#endif /* __GSOCK_MSW_H */
+#endif /* _WX_MSW_GSOCKMSW_H_ */
// Name: wx/private/gsocketiohandler.h
// Purpose: class for registering GSocket in wxSelectDispatcher
// Authors: Lukasz Michalski
-// Modified by:
// Created: December 2006
// Copyright: (c) Lukasz Michalski
// RCS-ID: $Id$
#define _WX_PRIVATE_GSOCKETIOHANDLER_H_
#include "wx/defs.h"
-#include "wx/private/selectdispatcher.h"
-#if wxUSE_SOCKETS
+#if wxUSE_SOCKETS && wxUSE_SELECT_DISPATCHER
-// forward declarations
-class GSocket;
+#include "wx/private/selectdispatcher.h"
+#include "wx/gsocket.h"
-class WXDLLIMPEXP_CORE wxGSocketIOHandler : public wxFDIOHandler
+class WXDLLIMPEXP_BASE wxGSocketIOHandler : public wxFDIOHandler
{
public:
- wxGSocketIOHandler(GSocket* socket);
- int GetFlags() const;
- void RemoveFlag(wxFDIODispatcherEntryFlags flag);
- void AddFlag(wxFDIODispatcherEntryFlags flag);
+ wxGSocketIOHandler(GSocket* socket)
+ {
+ m_socket = socket;
+ m_flags = 0;
+ }
+
+ int GetFlags() const { return m_flags; }
+ void RemoveFlag(wxFDIODispatcherEntryFlags flag) { m_flags &= ~flag; }
+ void AddFlag(wxFDIODispatcherEntryFlags flag) { m_flags |= flag; }
- virtual void OnReadWaiting();
- virtual void OnWriteWaiting();
- virtual void OnExceptionWaiting();
+ virtual void OnReadWaiting() { m_socket->Detected_Read(); }
+ virtual void OnWriteWaiting() { m_socket->Detected_Write(); }
+ virtual void OnExceptionWaiting() { m_socket->Detected_Read(); }
private:
GSocket* m_socket;
int m_flags;
};
-#endif // wxUSE_SOCKETS
+#endif // wxUSE_SOCKETS && wxUSE_SELECT_DISPATCHER
#endif // _WX_PRIVATE_SOCKETEVTDISPATCH_H_
// ----------------
// TODO
+
+#if wxUSE_SOCKETS
+ // returns the select()-based socket manager for console applications which
+ // is also used by some ports (wxX11, wxDFB) in the GUI build (hence it is
+ // here and not in wxConsoleAppTraits)
+ virtual GSocketManager *GetSocketManager();
+#endif
};
#endif // _WX_UNIX_APPTBASE_H_
#if defined(__WXDEBUG__) && defined(__WXGTK20__)
virtual bool ShowAssertDialog(const wxString& msg);
#endif
+
+ // GTK+ and Motif integrate sockets directly in their main loop, the other
+ // Unix ports do it at wxEventLoop level
+ //
+ // TODO: Should we use XtAddInput() for wxX11 too? Or, vice versa, if there
+ // is no advantage in doing this compared to the generic way
+ // currently used by wxX11, should we continue to use GTK/Motif-
+ // specific stuff?
+#if wxUSE_SOCKETS && (defined(__WXGTK__) || defined(__WXMOTIF__))
+ virtual GSocketManager *GetSocketManager();
+#endif
};
#endif // wxUSE_GUI
* -------------------------------------------------------------------------
*/
-#ifndef __GSOCK_UNX_H
-#define __GSOCK_UNX_H
-
-#ifndef __GSOCKET_STANDALONE__
-#include "wx/setup.h"
-#endif
+#ifndef _WX_UNIX_GSOCKUNX_H_
+#define _WX_UNIX_GSOCKUNX_H_
class wxGSocketIOHandler;
-#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
-
-#ifndef __GSOCKET_STANDALONE__
-#include "wx/gsocket.h"
-#else
-#include "gsocket.h"
-#endif
-
-class GSocketGUIFunctionsTableConcrete : public GSocketGUIFunctionsTable
-{
-public:
- virtual bool OnInit();
- virtual void OnExit();
- virtual bool CanUseEventLoop();
- virtual bool Init_Socket(GSocket *socket);
- virtual void Destroy_Socket(GSocket *socket);
- virtual void Install_Callback(GSocket *socket, GSocketEvent event);
- virtual void Uninstall_Callback(GSocket *socket, GSocketEvent event);
- virtual void Enable_Events(GSocket *socket);
- virtual void Disable_Events(GSocket *socket);
-};
-
class GSocket
{
public:
GSocketError GetSockOpt(int level, int optname, void *optval, int *optlen);
GSocketError SetSockOpt(int level, int optname,
const void *optval, int optlen);
+ //attach or detach from main loop
+ void Notify(bool flag);
virtual void Detected_Read();
virtual void Detected_Write();
void SetInitialSocketBuffers(int recv, int send)
}
protected:
+ //enable or disable event callback using gsocket gui callback table
+ void EnableEvents(bool flag = true);
+ void DisableEvents() { EnableEvents(false); }
void Enable(GSocketEvent event);
void Disable(GSocketEvent event);
GSocketError Input_Timeout();
bool m_dobind;
unsigned long m_timeout;
+ // true if socket should fire events
+ bool m_use_events;
+
/* Callbacks */
GSocketEventFlags m_detected;
GSocketCallback m_cbacks[GSOCK_MAX_EVENT];
char *m_data[GSOCK_MAX_EVENT];
- char *m_gui_dependent;
-
+ // pointer for storing extra (usually GUI-specific) data
+ void *m_gui_dependent;
};
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
/* Definition of GAddress */
struct _GAddress
{
GSocketError m_error;
};
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
/* GAddress */
GSocketError _GAddress_Init_INET(GAddress *address);
GSocketError _GAddress_Init_UNIX(GAddress *address);
+// A version of GSocketManager which uses FDs for socket IO
+//
+// This class uses GSocket::m_gui_dependent field to store the 2 (for input and
+// output) FDs associated with the socket.
+class GSocketFDBasedManager : public GSocketManager
+{
+public:
+ // no special initialization/cleanup needed when using FDs
+ virtual bool OnInit() { return true; }
+ virtual void OnExit() { }
+
+ // allocate/free the storage we need
+ virtual bool Init_Socket(GSocket *socket)
+ {
+ socket->m_gui_dependent = malloc(sizeof(int)*2);
+ int * const fds = wx_static_cast(int *, socket->m_gui_dependent);
+
+ fds[0] = -1;
+ fds[1] = -1;
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+ return true;
+ }
+ virtual void Destroy_Socket(GSocket *socket)
+ {
+ free(socket->m_gui_dependent);
+ }
-#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
+ virtual void Enable_Events(GSocket *socket)
+ {
+ Install_Callback(socket, GSOCK_INPUT);
+ Install_Callback(socket, GSOCK_OUTPUT);
+ }
+ virtual void Disable_Events(GSocket *socket)
+ {
+ Uninstall_Callback(socket, GSOCK_INPUT);
+ Uninstall_Callback(socket, GSOCK_OUTPUT);
+ }
+
+protected:
+ // identifies either input or output direction
+ //
+ // NB: the values of this enum shouldn't change
+ enum SocketDir
+ {
+ FD_INPUT,
+ FD_OUTPUT
+ };
+
+ // get the FD index corresponding to the given GSocketEvent
+ SocketDir GetDirForEvent(GSocket *socket, GSocketEvent event)
+ {
+ switch ( event )
+ {
+ default:
+ wxFAIL_MSG( "unexpected socket event" );
+ // fall through
+
+ case GSOCK_LOST:
+ // fall through
+
+ case GSOCK_INPUT:
+ return FD_INPUT;
+
+ case GSOCK_OUTPUT:
+ return FD_OUTPUT;
+
+ case GSOCK_CONNECTION:
+ // FIXME: explain this?
+ return socket->m_server ? FD_INPUT : FD_OUTPUT;
+ }
+ }
+
+ // access the FDs we store
+ int& FD(GSocket *socket, SocketDir d)
+ {
+ return wx_static_cast(int *, socket->m_gui_dependent)[d];
+ }
+};
+
+// Common base class for all ports using X11-like (and hence implemented in
+// X11, Motif and GTK) AddInput() and RemoveInput() functions
+class GSocketInputBasedManager : public GSocketFDBasedManager
+{
+public:
+ virtual void Install_Callback(GSocket *socket, GSocketEvent event)
+ {
+ wxCHECK_RET( socket->m_fd != -1,
+ "shouldn't be called on invalid socket" );
+
+ const SocketDir d = GetDirForEvent(socket, event);
+
+ int& fd = FD(socket, d);
+ if ( fd != -1 )
+ RemoveInput(fd);
+
+ fd = AddInput(socket, d);
+ }
+
+ virtual void Uninstall_Callback(GSocket *socket, GSocketEvent event)
+ {
+ const SocketDir d = GetDirForEvent(socket, event);
+
+ int& fd = FD(socket, d);
+ if ( fd != -1 )
+ {
+ RemoveInput(fd);
+ fd = -1;
+ }
+ }
+
+private:
+ // these functions map directly to XtAdd/RemoveInput() or
+ // gdk_input_add/remove()
+ virtual int AddInput(GSocket *socket, SocketDir d) = 0;
+ virtual void RemoveInput(int fd) = 0;
+};
-#endif /* __GSOCK_UNX_H */
+#endif /* _WX_UNIX_GSOCKUNX_H_ */
$(os2_lib_res) \
server_server.o \
$(__server___win32rc)
+BASECLIENT_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
+ $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
+ -I$(srcdir) $(__DLLFLAG_p) -DwxUSE_GUI=0 $(CXXWARNINGS) $(CPPFLAGS) \
+ $(CXXFLAGS)
+BASECLIENT_OBJECTS = \
+ baseclient_baseclient.o
+BASESERVER_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
+ $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
+ -I$(srcdir) $(__DLLFLAG_p) -DwxUSE_GUI=0 $(CXXWARNINGS) $(CPPFLAGS) \
+ $(CXXFLAGS)
+BASESERVER_OBJECTS = \
+ baseserver_baseserver.o
### Conditionally set variables: ###
@COND_MONOLITHIC_1@EXTRALIBS_FOR_BASE = $(EXTRALIBS) $(EXTRALIBS_GUI)
@COND_MONOLITHIC_0@EXTRALIBS_FOR_GUI = $(EXTRALIBS_GUI)
@COND_MONOLITHIC_1@EXTRALIBS_FOR_GUI =
+@COND_USE_GUI_1@__client___depname = client$(EXEEXT)
@COND_PLATFORM_MAC_1@__client___mac_setfilecmd = \
@COND_PLATFORM_MAC_1@ $(SETFILE) -a C client$(EXEEXT)
@COND_PLATFORM_MAC_1@__client___mac_rezcmd = $(__MACOSX_RESOURCES_p_2)
@COND_TOOLKIT_MAC@____client_BUNDLE_TGT_REF_DEP = \
@COND_TOOLKIT_MAC@ client.app/Contents/PkgInfo
@COND_PLATFORM_WIN32_1@__client___win32rc = client_client_rc.o
+@COND_USE_GUI_1@__server___depname = server$(EXEEXT)
@COND_PLATFORM_MAC_1@__server___mac_setfilecmd = \
@COND_PLATFORM_MAC_1@ $(SETFILE) -a C server$(EXEEXT)
@COND_PLATFORM_MAC_1@__server___mac_rezcmd = $(__MACOSX_RESOURCES_p_3)
@COND_TOOLKIT_MAC@____server_BUNDLE_TGT_REF_DEP = \
@COND_TOOLKIT_MAC@ server.app/Contents/PkgInfo
@COND_PLATFORM_WIN32_1@__server___win32rc = server_server_rc.o
+@COND_PLATFORM_MAC_1@__baseclient___mac_setfilecmd = \
+@COND_PLATFORM_MAC_1@ $(SETFILE) -t APPL baseclient$(EXEEXT)
+@COND_PLATFORM_MAC_1@__baseserver___mac_setfilecmd = \
+@COND_PLATFORM_MAC_1@ $(SETFILE) -t APPL baseserver$(EXEEXT)
COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_2 = $(REZ) -d __DARWIN__ -t APPL -d \
__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) \
$(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) -i $(srcdir) $(__DLLFLAG_p_0) -i \
$(srcdir)/../../samples $(__RCDEFDIR_p) -i $(top_srcdir)/include -o \
server$(EXEEXT) Carbon.r sample.r
@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_3 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_3)
-@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
@COND_WXUNIV_1@__WXUNIV_DEFINE_p_0 = -d __WXUNIVERSAL__
-@COND_WXUNIV_1@__WXUNIV_DEFINE_p_6 = --define __WXUNIVERSAL__
-@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
+@COND_WXUNIV_1@__WXUNIV_DEFINE_p_7 = --define __WXUNIVERSAL__
@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_0 = -d wxNO_EXCEPTIONS
-@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_6 = --define wxNO_EXCEPTIONS
-@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI
+@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_7 = --define wxNO_EXCEPTIONS
@COND_USE_RTTI_0@__RTTI_DEFINE_p_0 = -d wxNO_RTTI
-@COND_USE_RTTI_0@__RTTI_DEFINE_p_6 = --define wxNO_RTTI
-@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS
+@COND_USE_RTTI_0@__RTTI_DEFINE_p_7 = --define wxNO_RTTI
@COND_USE_THREADS_0@__THREAD_DEFINE_p_0 = -d wxNO_THREADS
-@COND_USE_THREADS_0@__THREAD_DEFINE_p_6 = --define wxNO_THREADS
-@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL
+@COND_USE_THREADS_0@__THREAD_DEFINE_p_7 = --define wxNO_THREADS
@COND_SHARED_1@__DLLFLAG_p_0 = -d WXUSINGDLL
-@COND_SHARED_1@__DLLFLAG_p_6 = --define WXUSINGDLL
+@COND_SHARED_1@__DLLFLAG_p_7 = --define WXUSINGDLL
@COND_TOOLKIT_MSW@__RCDEFDIR_p = -i \
@COND_TOOLKIT_MSW@ $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
@COND_TOOLKIT_MSW@__RCDEFDIR_p_0 = --include-dir \
COND_MONOLITHIC_0___WXLIB_CORE_p = \
-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p)
-COND_MONOLITHIC_0___WXLIB_NET_p = \
- -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_MONOLITHIC_0@__WXLIB_NET_p = $(COND_MONOLITHIC_0___WXLIB_NET_p)
-COND_MONOLITHIC_0___WXLIB_BASE_p = \
- -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
-COND_MONOLITHIC_1___WXLIB_MONO_p = \
- -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \
@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \
@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \
@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \
@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
+@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
+@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI
+@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS
+@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL
+COND_MONOLITHIC_0___WXLIB_NET_p = \
+ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_MONOLITHIC_0@__WXLIB_NET_p = $(COND_MONOLITHIC_0___WXLIB_NET_p)
+COND_MONOLITHIC_0___WXLIB_BASE_p = \
+ -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
+COND_MONOLITHIC_1___WXLIB_MONO_p = \
+ -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
@COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \
@COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p = \
### Targets: ###
-all: client$(EXEEXT) $(__client_bundle___depname) server$(EXEEXT) $(__server_bundle___depname)
+all: $(__client___depname) $(__client_bundle___depname) $(__server___depname) $(__server_bundle___depname) baseclient$(EXEEXT) baseserver$(EXEEXT)
install: all
rm -rf client.app
rm -f server$(EXEEXT)
rm -rf server.app
+ rm -f baseclient$(EXEEXT)
+ rm -f baseserver$(EXEEXT)
distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
-client$(EXEEXT): $(CLIENT_OBJECTS) $(__client___win32rc)
- $(CXX) -o $@ $(CLIENT_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LIBS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE)
- $(__client___mac_rezcmd)
- $(__client___mac_setfilecmd)
- $(__client___os2_emxbindcmd)
- $(SAMPLES_RPATH_POSTLINK)
+@COND_USE_GUI_1@client$(EXEEXT): $(CLIENT_OBJECTS) $(__client___win32rc)
+@COND_USE_GUI_1@ $(CXX) -o $@ $(CLIENT_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LIBS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE)
+@COND_USE_GUI_1@ $(__client___mac_rezcmd)
+@COND_USE_GUI_1@ $(__client___mac_setfilecmd)
+@COND_USE_GUI_1@ $(__client___os2_emxbindcmd)
+@COND_USE_GUI_1@ $(SAMPLES_RPATH_POSTLINK)
-client.app/Contents/PkgInfo: client$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(top_srcdir)/src/mac/carbon/wxmac.icns
+client.app/Contents/PkgInfo: $(__client___depname) $(top_srcdir)/src/mac/carbon/Info.plist.in $(top_srcdir)/src/mac/carbon/wxmac.icns
mkdir -p client.app/Contents
mkdir -p client.app/Contents/MacOS
mkdir -p client.app/Contents/Resources
@COND_PLATFORM_MACOSX_1@client_bundle: $(____client_BUNDLE_TGT_REF_DEP)
-server$(EXEEXT): $(SERVER_OBJECTS) $(__server___win32rc)
- $(CXX) -o $@ $(SERVER_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LIBS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE)
- $(__server___mac_rezcmd)
- $(__server___mac_setfilecmd)
- $(__server___os2_emxbindcmd)
- $(SAMPLES_RPATH_POSTLINK)
+@COND_USE_GUI_1@server$(EXEEXT): $(SERVER_OBJECTS) $(__server___win32rc)
+@COND_USE_GUI_1@ $(CXX) -o $@ $(SERVER_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LIBS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE)
+@COND_USE_GUI_1@ $(__server___mac_rezcmd)
+@COND_USE_GUI_1@ $(__server___mac_setfilecmd)
+@COND_USE_GUI_1@ $(__server___os2_emxbindcmd)
+@COND_USE_GUI_1@ $(SAMPLES_RPATH_POSTLINK)
-server.app/Contents/PkgInfo: server$(EXEEXT) $(top_srcdir)/src/mac/carbon/Info.plist.in $(top_srcdir)/src/mac/carbon/wxmac.icns
+server.app/Contents/PkgInfo: $(__server___depname) $(top_srcdir)/src/mac/carbon/Info.plist.in $(top_srcdir)/src/mac/carbon/wxmac.icns
mkdir -p server.app/Contents
mkdir -p server.app/Contents/MacOS
mkdir -p server.app/Contents/Resources
@COND_PLATFORM_MACOSX_1@server_bundle: $(____server_BUNDLE_TGT_REF_DEP)
+baseclient$(EXEEXT): $(BASECLIENT_OBJECTS)
+ $(CXX) -o $@ $(BASECLIENT_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(LIBS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE)
+
+ $(__baseclient___mac_setfilecmd)
+ $(SAMPLES_RPATH_POSTLINK)
+
+baseserver$(EXEEXT): $(BASESERVER_OBJECTS)
+ $(CXX) -o $@ $(BASESERVER_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(SAMPLES_RPATH_FLAG) $(LIBS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE)
+
+ $(__baseserver___mac_setfilecmd)
+ $(SAMPLES_RPATH_POSTLINK)
+
client_client.o: $(srcdir)/client.cpp
$(CXXC) -c -o $@ $(CLIENT_CXXFLAGS) $(srcdir)/client.cpp
client_client_rc.o: $(srcdir)/client.rc
- $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_6) $(__EXCEPTIONS_DEFINE_p_6) $(__RTTI_DEFINE_p_6) $(__THREAD_DEFINE_p_6) --include-dir $(srcdir) $(__DLLFLAG_p_6) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p_0) --include-dir $(top_srcdir)/include
+ $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_7) $(__EXCEPTIONS_DEFINE_p_7) $(__RTTI_DEFINE_p_7) $(__THREAD_DEFINE_p_7) --include-dir $(srcdir) $(__DLLFLAG_p_7) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p_0) --include-dir $(top_srcdir)/include
server_server.o: $(srcdir)/server.cpp
$(CXXC) -c -o $@ $(SERVER_CXXFLAGS) $(srcdir)/server.cpp
server_server_rc.o: $(srcdir)/server.rc
- $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_6) $(__EXCEPTIONS_DEFINE_p_6) $(__RTTI_DEFINE_p_6) $(__THREAD_DEFINE_p_6) --include-dir $(srcdir) $(__DLLFLAG_p_6) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p_0) --include-dir $(top_srcdir)/include
+ $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_7) $(__EXCEPTIONS_DEFINE_p_7) $(__RTTI_DEFINE_p_7) $(__THREAD_DEFINE_p_7) --include-dir $(srcdir) $(__DLLFLAG_p_7) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p_0) --include-dir $(top_srcdir)/include
+
+baseclient_baseclient.o: $(srcdir)/baseclient.cpp
+ $(CXXC) -c -o $@ $(BASECLIENT_CXXFLAGS) $(srcdir)/baseclient.cpp
+
+baseserver_baseserver.o: $(srcdir)/baseserver.cpp
+ $(CXXC) -c -o $@ $(BASESERVER_CXXFLAGS) $(srcdir)/baseserver.cpp
# Include dependency info, if present:
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: samples/sockbase/client.cpp
+// Purpose: Sockets sample for wxBase
+// Author: Lukasz Michalski
+// Modified by:
+// Created: 27.06.2005
+// RCS-ID: $Id$
+// Copyright: (c) 2005 Lukasz Michalski <lmichalski@sf.net>
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/wx.h"
+#include "wx/socket.h"
+#include "wx/event.h"
+#include "wx/list.h"
+#include "wx/cmdline.h"
+#include "wx/ffile.h"
+#include "wx/datetime.h"
+#include "wx/timer.h"
+#include "wx/thread.h"
+
+const wxEventType wxEVT_WORKER = wxNewEventType();
+#define EVT_WORKER(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_WORKER, -1, -1, (wxObjectEventFunction) (wxEventFunction) (WorkerEventFunction) & func, (wxObject *) NULL ),
+
+const int timeout_val = 1000;
+
+class WorkerEvent : public wxEvent {
+public:
+ typedef enum {
+ CONNECTING,
+ SENDING,
+ RECEIVING,
+ DISCONNECTING,
+ DONE
+ } evt_type;
+ WorkerEvent(void* pSender, evt_type type)
+ {
+ SetId(-1);
+ SetEventType(wxEVT_WORKER);
+ m_sender = pSender;
+ m_eventType = type;
+ m_isFailed = false;
+ }
+
+ void setFailed() { m_isFailed = true; }
+ bool isFailed() const { return m_isFailed; }
+
+ virtual wxEvent* Clone() const
+ {
+ return new WorkerEvent(*this);
+ }
+ void* m_sender;
+ bool m_isFailed;
+ wxString m_workerIdent;
+ evt_type m_eventType;
+};
+
+typedef void (wxEvtHandler::*WorkerEventFunction)(WorkerEvent&);
+
+class ThreadWorker;
+class EventWorker;
+
+WX_DECLARE_LIST(ThreadWorker, TList);
+WX_DECLARE_LIST(EventWorker, EList);
+
+class Client : public wxApp {
+ DECLARE_EVENT_TABLE();
+public:
+ void RemoveEventWorker(EventWorker* p_worker);
+private:
+ typedef enum
+ {
+ THREADS,
+ EVENTS
+ } workMode;
+
+ typedef enum
+ {
+ SEND_RANDOM,
+ SEND_MESSAGE,
+ STRESS_TEST
+ } sendType;
+
+ workMode m_workMode;
+ sendType m_sendType;
+ wxString m_message;
+ wxString m_host;
+ long m_stressWorkers;
+
+ virtual bool OnInit();
+ virtual int OnRun();
+ virtual int OnExit();
+ void OnInitCmdLine(wxCmdLineParser& pParser);
+ bool OnCmdLineParsed(wxCmdLineParser& pParser);
+ void OnWorkerEvent(WorkerEvent& pEvent);
+ void OnTimerEvent(wxTimerEvent& pEvent);
+
+ void StartWorker(workMode pMode, const wxString& pMessage);
+ void StartWorker(workMode pMode);
+ char* CreateBuffer(int *msgsize);
+
+ void dumpStatistics();
+
+ TList m_threadWorkers;
+ EList m_eventWorkers;
+
+ unsigned m_statConnecting;
+ unsigned m_statSending;
+ unsigned m_statReceiving;
+ unsigned m_statDisconnecting;
+ unsigned m_statDone;
+ unsigned m_statFailed;
+
+ wxTimer mTimer;
+};
+
+DECLARE_APP(Client);
+
+class ThreadWorker : public wxThread
+{
+public:
+ ThreadWorker(const wxString& p_host, char* p_buf, int p_size);
+ virtual ExitCode Entry();
+private:
+ wxString m_host;
+ wxSocketClient* m_clientSocket;
+ char* m_inbuf;
+ char* m_outbuf;
+ int m_outsize;
+ int m_insize;
+ wxString m_workerIdent;
+};
+
+class EventWorker : public wxEvtHandler
+{
+ DECLARE_EVENT_TABLE();
+public:
+ EventWorker(const wxString& p_host, char* p_buf, int p_size);
+ void Run();
+ virtual ~EventWorker();
+private:
+ wxString m_host;
+ wxSocketClient* m_clientSocket;
+ char* m_inbuf;
+ char* m_outbuf;
+ int m_outsize;
+ int m_written;
+ int m_insize;
+ int m_readed;
+
+ WorkerEvent::evt_type m_currentType;
+ bool m_doneSent;
+ wxIPV4address m_localaddr;
+
+ void OnSocketEvent(wxSocketEvent& pEvent);
+ void SendEvent(bool failed);
+};
+
+/******************* Implementation ******************/
+IMPLEMENT_APP_CONSOLE(Client);
+
+#include <wx/listimpl.cpp>
+WX_DEFINE_LIST(TList);
+WX_DEFINE_LIST(EList);
+
+wxString
+CreateIdent(const wxIPV4address& addr)
+{
+ return wxString::Format(wxT("%s:%d"),addr.IPAddress().c_str(),addr.Service());
+}
+
+void
+Client::OnInitCmdLine(wxCmdLineParser& pParser)
+{
+ wxApp::OnInitCmdLine(pParser);
+ pParser.AddSwitch(wxT("e"),wxT("event"),_("Use event based worker (default)"),wxCMD_LINE_PARAM_OPTIONAL);
+ pParser.AddSwitch(wxT("t"),wxT("thread"),_("Use thread based worker"),wxCMD_LINE_PARAM_OPTIONAL);
+ pParser.AddSwitch(wxT("r"),wxT("random"),_("Send radnom data (default)"),wxCMD_LINE_PARAM_OPTIONAL);
+ pParser.AddOption(wxT("m"),wxT("message"),_("Send message from <str>"),wxCMD_LINE_VAL_STRING,wxCMD_LINE_PARAM_OPTIONAL);
+ pParser.AddOption(wxT("f"),wxT("file"),_("Send contents of <file>"),wxCMD_LINE_VAL_STRING,wxCMD_LINE_PARAM_OPTIONAL);
+ pParser.AddOption(wxT("H"),wxT("hostname"),_("IP or name of host to connect to"),wxCMD_LINE_VAL_STRING,wxCMD_LINE_PARAM_OPTIONAL);
+ pParser.AddOption(wxT("s"),wxT("stress"),_("stress test with <num> concurrent connections"),wxCMD_LINE_VAL_NUMBER,wxCMD_LINE_PARAM_OPTIONAL);
+}
+
+
+bool
+Client::OnCmdLineParsed(wxCmdLineParser& pParser)
+{
+ wxString fname;
+ m_workMode = EVENTS;
+ m_stressWorkers = 50;
+
+ if (pParser.Found(_("verbose")))
+ {
+ wxLog::AddTraceMask(wxT("wxSocket"));
+ wxLog::AddTraceMask(wxT("epolldispatcher"));
+ wxLog::AddTraceMask(wxT("selectdispatcher"));
+ wxLog::AddTraceMask(wxT("thread"));
+ wxLog::AddTraceMask(wxT("events"));
+ }
+
+ if (pParser.Found(wxT("t")))
+ m_workMode = THREADS;
+ m_sendType = SEND_RANDOM;
+
+ if (pParser.Found(wxT("m"),&m_message))
+ m_sendType = SEND_MESSAGE;
+ else if (pParser.Found(wxT("f"),&fname))
+ {
+ wxFFile file(fname);
+ if (!file.IsOpened()) {
+ wxLogError(wxT("Cannot open file %s"),fname.c_str());
+ return false;
+ };
+ if (!file.ReadAll(&m_message)) {
+ wxLogError(wxT("Cannot read conten of file %s"),fname.c_str());
+ return false;
+ };
+ m_sendType = SEND_MESSAGE;
+ };
+
+ if (pParser.Found(wxT("s"),&m_stressWorkers))
+ m_sendType = STRESS_TEST;
+
+ m_host = wxT("127.0.0.1");
+ pParser.Found(wxT("H"),&m_host);
+ return wxApp::OnCmdLineParsed(pParser);
+};
+
+bool
+Client::OnInit()
+{
+ if (!wxApp::OnInit())
+ return false;
+ srand(wxDateTime::Now().GetTicks());
+ mTimer.SetOwner(this);
+ m_statConnecting = 0;
+ m_statSending = 0;
+ m_statReceiving = 0;
+ m_statDisconnecting = 0;
+ m_statDone = 0;
+ m_statFailed = 0;
+ return true;
+}
+
+int
+Client::OnRun()
+{
+ switch(m_sendType)
+ {
+ case STRESS_TEST:
+ switch(m_workMode)
+ {
+ case THREADS:
+ for (int i = 0; i < m_stressWorkers; i++) {
+ if (m_message.empty())
+ StartWorker(THREADS);
+ else
+ StartWorker(THREADS, m_message);
+ }
+ break;
+ case EVENTS:
+ for (int i = 0; i < m_stressWorkers; i++) {
+ if (m_message.empty())
+ StartWorker(EVENTS);
+ else
+ StartWorker(EVENTS, m_message);
+ }
+ break;
+ default:
+ for (int i = 0; i < m_stressWorkers; i++) {
+ if (m_message.empty())
+ StartWorker(i % 5 == 0 ? THREADS : EVENTS);
+ else
+ StartWorker(i % 5 == 0 ? THREADS : EVENTS, m_message);
+ }
+ break;
+ }
+ break;
+ case SEND_MESSAGE:
+ StartWorker(m_workMode,m_message);
+ break;
+ case SEND_RANDOM:
+ StartWorker(m_workMode);
+ break;
+ }
+ mTimer.Start(timeout_val,true);
+ return wxApp::OnRun();
+}
+
+int
+Client::OnExit()
+{
+ for(EList::compatibility_iterator it = m_eventWorkers.GetFirst(); it ; it->GetNext()) {
+ delete it->GetData();
+ }
+ return 0;
+}
+
+// Create buffer to be sent by client. Buffer contains test indicator
+// message size and place for data
+// msgsize parameter contains size of data in bytes and
+// if input value does not fit into 250 bytes then
+// on exit is updated to new value that is multiply of 1024 bytes
+char*
+Client::CreateBuffer(int* msgsize)
+{
+ int bufsize = 0;
+ char* buf;
+ //if message should have more than 256 bytes then set it as
+ //test3 for compatibility with GUI server sample
+ if ((*msgsize) > 250)
+ {
+ //send at least one kb of data
+ int size = (*msgsize)/1024 + 1;
+ //returned buffer will contain test indicator, message size in kb and data
+ bufsize = size*1024+2;
+ buf = new char[bufsize];
+ buf[0] = 0xDE; //second byte contains size in kilobytes
+ buf[1] = (char)(size);
+ *msgsize = size*1024;
+ }
+ else
+ {
+ //returned buffer will contain test indicator, message size in kb and data
+ bufsize = (*msgsize)+2;
+ buf = new char[bufsize];
+ buf[0] = 0xBE; //second byte contains size in bytes
+ buf[1] = (char)(*msgsize);
+ }
+ return buf;
+}
+
+void
+Client::StartWorker(workMode pMode) {
+ int msgsize = 1 + (int) (250000.0 * (rand() / (RAND_MAX + 1.0)));
+ char* buf = CreateBuffer(&msgsize);
+
+ //fill data part of buffer with random bytes
+ for (int i = 2; i < (msgsize); i++) {
+ buf[i] = i % 256;
+ }
+
+ if (pMode == THREADS) {
+ ThreadWorker* c = new ThreadWorker(m_host,buf,msgsize+2);
+ if (c->Create() != wxTHREAD_NO_ERROR) {
+ wxLogError(wxT("Cannot create more threads"));
+ } else {
+ c->Run();
+ m_threadWorkers.Append(c);
+ }
+ } else {
+ EventWorker* e = new EventWorker(m_host,buf,msgsize+2);
+ e->Run();
+ m_eventWorkers.Append(e);
+ }
+ m_statConnecting++;
+}
+
+void
+Client::StartWorker(workMode pMode, const wxString& pMessage) {
+ char* tmpbuf = strdup(pMessage.mb_str());
+ int msgsize = strlen(tmpbuf);
+ char* buf = CreateBuffer(&msgsize);
+ memset(buf+2,0x0,msgsize);
+ memcpy(buf+2,tmpbuf,msgsize);
+ free(tmpbuf);
+
+ if (pMode == THREADS) {
+ ThreadWorker* c = new ThreadWorker(m_host,buf,msgsize+2);
+ if (c->Create() != wxTHREAD_NO_ERROR) {
+ wxLogError(wxT("Cannot create more threads"));
+ } else {
+ c->Run();
+ m_threadWorkers.Append(c);
+ }
+ } else {
+ EventWorker* e = new EventWorker(m_host,buf,msgsize+2);
+ e->Run();
+ m_eventWorkers.Append(e);
+ }
+ m_statConnecting++;
+}
+
+void
+Client::OnWorkerEvent(WorkerEvent& pEvent) {
+ switch (pEvent.m_eventType) {
+ case WorkerEvent::CONNECTING:
+ if (pEvent.isFailed())
+ {
+ m_statConnecting--;
+ m_statFailed++;
+ }
+ break;
+ case WorkerEvent::SENDING:
+ if (pEvent.isFailed())
+ {
+ m_statFailed++;
+ m_statSending--;
+ }
+ else
+ {
+ m_statConnecting--;
+ m_statSending++;
+ }
+ break;
+ case WorkerEvent::RECEIVING:
+ if (pEvent.isFailed())
+ {
+ m_statReceiving--;
+ m_statFailed++;
+ }
+ else
+ {
+ m_statSending--;
+ m_statReceiving++;
+ }
+ break;
+ case WorkerEvent::DISCONNECTING:
+ if (pEvent.isFailed())
+ {
+ m_statDisconnecting--;
+ m_statFailed++;
+ }
+ else
+ {
+ m_statReceiving--;
+ m_statDisconnecting++;
+ }
+ break;
+ case WorkerEvent::DONE:
+ m_statDone++;
+ m_statDisconnecting--;
+ break;
+ };
+
+ if (pEvent.isFailed() || pEvent.m_eventType == WorkerEvent::DONE)
+ {
+ for(TList::compatibility_iterator it = m_threadWorkers.GetFirst(); it ; it = it->GetNext()) {
+ if (it->GetData() == pEvent.m_sender) {
+ m_threadWorkers.DeleteNode(it);
+ break;
+ }
+ }
+ for(EList::compatibility_iterator it = m_eventWorkers.GetFirst(); it ; it = it->GetNext())
+ {
+ if (it->GetData() == pEvent.m_sender) {
+ delete it->GetData();
+ m_eventWorkers.DeleteNode(it);
+ break;
+ }
+ }
+ if ((m_threadWorkers.GetCount() == 0) && (m_eventWorkers.GetCount() == 0))
+ {
+ mTimer.Stop();
+ dumpStatistics();
+ wxSleep(2);
+ ExitMainLoop();
+ }
+ else
+ {
+ mTimer.Start(timeout_val,true);
+ }
+ }
+}
+
+void
+Client::RemoveEventWorker(EventWorker* p_worker) {
+ for(EList::compatibility_iterator it = m_eventWorkers.GetFirst(); it ; it = it->GetNext()) {
+ if (it->GetData() == p_worker) {
+ //wxLogDebug(wxT("Deleting event worker"));
+ delete it->GetData();
+ m_eventWorkers.DeleteNode(it);
+ return;
+ }
+ }
+}
+
+void
+Client::dumpStatistics() {
+ wxString msg(
+ wxString::Format(_("Connecting:\t%d\nSending\t\t%d\nReceiving\t%d\nDisconnecting:\t%d\nDone:\t\t%d\nFailed:\t\t%d\n"),
+ m_statConnecting,
+ m_statSending,
+ m_statReceiving,
+ m_statDisconnecting,
+ m_statDone,
+ m_statFailed
+ ));
+
+ wxLogMessage(wxT("Current status:\n%s\n"),msg.c_str());
+}
+
+void
+Client::OnTimerEvent(wxTimerEvent&) {
+ dumpStatistics();
+}
+
+BEGIN_EVENT_TABLE(Client,wxEvtHandler)
+ EVT_WORKER(Client::OnWorkerEvent)
+ EVT_TIMER(wxID_ANY,Client::OnTimerEvent)
+END_EVENT_TABLE()
+
+
+
+EventWorker::EventWorker(const wxString& p_host, char* p_buf, int p_size)
+ : m_host(p_host),
+ m_outbuf(p_buf),
+ m_outsize(p_size),
+ m_written(0),
+ m_readed(0)
+{
+ m_clientSocket = new wxSocketClient(wxSOCKET_NOWAIT);
+ m_clientSocket->SetEventHandler(*this);
+ m_insize = m_outsize - 2;
+ m_inbuf = new char[m_insize];
+}
+
+void
+EventWorker::Run() {
+ wxIPV4address ca;
+ ca.Hostname(m_host);
+ ca.Service(3000);
+ m_clientSocket->SetNotify(wxSOCKET_CONNECTION_FLAG|wxSOCKET_LOST_FLAG|wxSOCKET_OUTPUT_FLAG|wxSOCKET_INPUT_FLAG);
+ m_clientSocket->Notify(true);
+ m_currentType = WorkerEvent::CONNECTING;
+ m_doneSent = false;
+ //wxLogMessage(wxT("EventWorker: Connecting....."));
+ m_clientSocket->Connect(ca,false);
+}
+
+void
+EventWorker::OnSocketEvent(wxSocketEvent& pEvent) {
+ switch(pEvent.GetSocketEvent()) {
+ case wxSOCKET_INPUT:
+ //wxLogDebug(wxT("EventWorker: INPUT"));
+ do {
+ if (m_readed == m_insize)
+ return; //event already posted
+ m_clientSocket->Read(m_inbuf + m_readed, m_insize - m_readed);
+ if (m_clientSocket->Error())
+ {
+ if (m_clientSocket->LastError() != wxSOCKET_WOULDBLOCK)
+ {
+ wxLogError(wxT("%s: read error"),CreateIdent(m_localaddr).c_str());
+ SendEvent(true);
+ }
+ }
+
+ m_readed += m_clientSocket->LastCount();
+ //wxLogDebug(wxT("EventWorker: readed %d bytes, %d bytes to do"),m_clientSocket->LastCount(), m_insize - m_readed);
+ if (m_readed == m_insize)
+ {
+ if (!memcmp(m_inbuf,m_outbuf,m_insize)) {
+ wxLogError(wxT("%s: data mismatch"),CreateIdent(m_localaddr).c_str());
+ SendEvent(true);
+ }
+ m_currentType = WorkerEvent::DISCONNECTING;
+ wxLogDebug(wxT("%s: DISCONNECTING"),CreateIdent(m_localaddr).c_str());
+ SendEvent(false);
+
+ //wxLogDebug(wxT("EventWorker %p closing"),this);
+ m_clientSocket->Close();
+
+ m_currentType = WorkerEvent::DONE;
+ wxLogDebug(wxT("%s: DONE"),CreateIdent(m_localaddr).c_str());
+ SendEvent(false);
+ }
+ } while (!m_clientSocket->Error());
+ break;
+ case wxSOCKET_OUTPUT:
+ //wxLogDebug(wxT("EventWorker: OUTPUT"));
+ do {
+ if (m_written == m_outsize)
+ return;
+ if (m_written == 0)
+ {
+ m_currentType = WorkerEvent::SENDING;
+ wxLogDebug(wxT("%s: SENDING"),CreateIdent(m_localaddr).c_str());
+ }
+ m_clientSocket->Write(m_outbuf + m_written, m_outsize - m_written);
+ if (m_clientSocket->Error())
+ {
+ if (m_clientSocket->LastError() != wxSOCKET_WOULDBLOCK) {
+ wxLogError(wxT("%s: Write error"),CreateIdent(m_localaddr).c_str());
+ SendEvent(true);
+ }
+ }
+ m_written += m_clientSocket->LastCount();
+ if (m_written != m_outsize)
+ {
+ //wxLogDebug(wxT("EventWorker: written %d bytes, %d bytes to do"),m_clientSocket->LastCount(),m_outsize - m_written);
+ }
+ else
+ {
+ //wxLogDebug(wxT("EventWorker %p SENDING->RECEIVING"),this);
+ m_currentType = WorkerEvent::RECEIVING;
+ wxLogDebug(wxT("%s: RECEIVING"),CreateIdent(m_localaddr).c_str());
+ SendEvent(false);
+ }
+ } while(!m_clientSocket->Error());
+ break;
+ case wxSOCKET_CONNECTION:
+ {
+ //wxLogMessage(wxT("EventWorker: got connection"));
+ wxLogMessage(wxT("%s: starting writing message (2 bytes for signature and %d bytes of data to write)"),CreateIdent(m_localaddr).c_str(),m_outsize-2);
+ if (!m_clientSocket->GetLocal(m_localaddr))
+ wxLogError(_("Cannot get peer data for socket %p"),m_clientSocket);
+ m_currentType = WorkerEvent::SENDING;
+ wxLogDebug(wxT("%s: CONNECTING"),CreateIdent(m_localaddr).c_str());
+ SendEvent(false);
+ }
+ break;
+ case wxSOCKET_LOST:
+ {
+ wxLogError(_("%s: connection lost"),CreateIdent(m_localaddr).c_str());
+ SendEvent(true);
+ }
+ break;
+ }
+}
+
+void
+EventWorker::SendEvent(bool failed) {
+ if (m_doneSent)
+ return;
+ WorkerEvent e(this,m_currentType);
+ if (failed) e.setFailed();
+ wxGetApp().AddPendingEvent(e);
+ m_doneSent = failed || m_currentType == WorkerEvent::DONE;
+};
+
+EventWorker::~EventWorker() {
+ m_clientSocket->Destroy();
+ delete [] m_outbuf;
+ delete [] m_inbuf;
+}
+
+BEGIN_EVENT_TABLE(EventWorker,wxEvtHandler)
+ EVT_SOCKET(wxID_ANY,EventWorker::OnSocketEvent)
+END_EVENT_TABLE()
+
+
+ThreadWorker::ThreadWorker(const wxString& p_host, char* p_buf, int p_size)
+ : wxThread(wxTHREAD_DETACHED),
+ m_host(p_host),
+ m_outbuf(p_buf),
+ m_outsize(p_size)
+{
+ m_clientSocket = new wxSocketClient(wxSOCKET_BLOCK|wxSOCKET_WAITALL);
+ m_insize = m_outsize - 2;
+ m_inbuf = new char[m_insize];
+}
+
+wxThread::ExitCode ThreadWorker::Entry()
+{
+ wxIPV4address ca;
+ ca.Hostname(m_host);
+ ca.Service(5678);
+ //wxLogDebug(wxT("ThreadWorker: Connecting....."));
+ m_clientSocket->SetTimeout(60);
+ bool failed = false;
+ WorkerEvent::evt_type etype = WorkerEvent::CONNECTING;
+ if (!m_clientSocket->Connect(ca)) {
+ wxLogError(wxT("Cannot connect to %s:%d"),ca.IPAddress().c_str(), ca.Service());
+ failed = true;
+ } else {
+ //wxLogMessage(wxT("ThreadWorker: Connected. Sending %d bytes of data"),m_outsize);
+ etype = WorkerEvent::SENDING;
+ WorkerEvent e(this,etype);
+ wxGetApp().AddPendingEvent(e);
+ int to_process = m_outsize;
+ do {
+ m_clientSocket->Write(m_outbuf,m_outsize);
+ if (m_clientSocket->Error()) {
+ wxLogError(wxT("ThreadWorker: Write error"));
+ failed = true;
+ }
+ to_process -= m_clientSocket->LastCount();
+ //wxLogDebug(wxT("EventWorker: written %d bytes, %d bytes to do"),m_clientSocket->LastCount(),to_process);
+ } while(!m_clientSocket->Error() && to_process != 0);
+
+ if (!failed) {
+ etype = WorkerEvent::RECEIVING;
+ WorkerEvent e(this,etype);
+ wxGetApp().AddPendingEvent(e);
+ to_process = m_insize;
+ do {
+ m_clientSocket->Read(m_inbuf,m_insize);
+ if (m_clientSocket->Error()) {
+ wxLogError(wxT("ThreadWorker: Read error"));
+ failed = true;
+ break;
+ }
+ to_process -= m_clientSocket->LastCount();
+ //wxLogDebug(wxT("EventWorker: readed %d bytes, %d bytes to do"),m_clientSocket->LastCount(),to_process);
+ } while(!m_clientSocket->Error() && to_process != 0);
+ }
+
+ char* outdat = (char*)m_outbuf+2;
+ if (!failed && (memcmp(m_inbuf,outdat,m_insize) != 0))
+ {
+ wxLogError(wxT("Data mismatch"));
+ failed = true;
+ }
+ }
+ //wxLogDebug(wxT("ThreadWorker: Finished"));
+ if (!failed) {
+ etype = WorkerEvent::DISCONNECTING;
+ WorkerEvent e(this,etype);
+ wxGetApp().AddPendingEvent(e);
+ };
+ m_clientSocket->Close();
+ m_clientSocket->Destroy();
+ m_clientSocket = NULL;
+ delete [] m_outbuf;
+ delete [] m_inbuf;
+ if (!failed)
+ etype = WorkerEvent::DONE;
+ WorkerEvent e(this,etype);
+ if (failed) e.setFailed();
+ wxGetApp().AddPendingEvent(e);
+ return 0;
+}
+
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: samples/sockbase/client.cpp
+// Purpose: Sockets sample for wxBase
+// Author: Lukasz Michalski
+// Modified by:
+// Created: 27.06.2005
+// RCS-ID: $Id$
+// Copyright: (c) 2005 Lukasz Michalski <lmichalski@user.sourceforge.net>
+// Licence: wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#include "wx/wx.h"
+#include "wx/socket.h"
+#include "wx/event.h"
+#include "wx/list.h"
+#include "wx/cmdline.h"
+#include "wx/datetime.h"
+#include "wx/timer.h"
+#include "wx/thread.h"
+
+wxChar* GetSocketErrorMsg(int pSockError)
+{
+ switch(pSockError)
+ {
+ case wxSOCKET_NOERROR:
+ return wxT("wxSOCKET_NOERROR");
+ break;
+ case wxSOCKET_INVOP:
+ return wxT("wxSOCKET_INVOP");
+ break;
+ case wxSOCKET_IOERR:
+ return wxT("wxSOCKET_IOERR");
+ break;
+ case wxSOCKET_INVADDR:
+ return wxT("wxSOCKET_INVADDR");
+ break;
+ case wxSOCKET_NOHOST:
+ return wxT("wxSOCKET_NOHOST");
+ break;
+ case wxSOCKET_INVPORT:
+ return wxT("wxSOCKET_INVPORT");
+ break;
+ case wxSOCKET_WOULDBLOCK:
+ return wxT("wxSOCKET_WOULDBLOCK");
+ break;
+ case wxSOCKET_TIMEDOUT:
+ return wxT("wxSOCKET_TIMEDOUT");
+ break;
+ case wxSOCKET_MEMERR:
+ return wxT("wxSOCKET_MEMERR");
+ break;
+ default:
+ return wxT("Unknown");
+ break;
+ }
+}
+
+//log output types for LogWorker helper function
+typedef enum
+{
+ LOG_MESSAGE,
+ LOG_ERROR,
+ LOG_VERBOSE
+} logWorker_t;
+
+//outputs log message with IP and TCP port number prepended
+void
+LogWorker(const wxIPV4address& pAddr, const wxString& pMessage, logWorker_t pType = LOG_VERBOSE)
+{
+ wxString msg(wxString::Format(wxT("%s:%d "),pAddr.IPAddress().c_str(),pAddr.Service()));
+ msg += pMessage;
+ switch (pType)
+ {
+ case LOG_VERBOSE:
+ wxLogVerbose(msg);
+ break;
+ case LOG_MESSAGE:
+ wxLogMessage(msg);
+ break;
+ case LOG_ERROR:
+ wxLogError(msg);
+ break;
+ }
+}
+
+//event sent by workers to server class
+//after client is served
+const wxEventType wxEVT_WORKER = wxNewEventType();
+#define EVT_WORKER(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_WORKER, -1, -1, (wxObjectEventFunction) (wxEventFunction) (WorkerEventFunction) & func, (wxObject *) NULL ),
+
+class WorkerEvent : public wxEvent {
+public:
+ WorkerEvent(void* pSender)
+ {
+ SetId(-1);
+ SetEventType(wxEVT_WORKER);
+ m_sender = pSender;
+ m_exit = false;
+ m_workerFailed = false;
+ }
+
+ virtual wxEvent* Clone() const
+ {
+ return new WorkerEvent(*this);
+ }
+
+ void* m_sender;
+ bool m_exit;
+ bool m_workerFailed;
+};
+
+typedef void (wxEvtHandler::*WorkerEventFunction)(WorkerEvent&);
+
+class ThreadWorker;
+class EventWorker;
+
+WX_DECLARE_LIST(ThreadWorker, TList);
+WX_DECLARE_LIST(EventWorker, EList);
+
+//main server class contains listening socket
+//and list of two type worker classes that serve clients
+class Server : public wxApp
+{
+ DECLARE_EVENT_TABLE();
+public:
+ Server() : m_maxConnections(-1) {}
+ ~Server() {}
+private:
+ enum WorkMode
+ {
+ MIXED,
+ THREADS,
+ EVENTS
+ };
+
+ virtual bool OnInit();
+ virtual int OnExit();
+
+ void OnInitCmdLine(wxCmdLineParser& pParser);
+ bool OnCmdLineParsed(wxCmdLineParser& pParser);
+
+ void OnSocketEvent(wxSocketEvent& pEvent);
+ void OnWorkerEvent(WorkerEvent& pEvent);
+ void OnTimerEvent(wxTimerEvent& pEvent);
+ void DumpStatistics();
+
+ TList m_threadWorkers;
+ EList m_eventWorkers;
+ WorkMode m_workMode;
+ wxSocketServer* m_listeningSocket;
+
+ // statistics
+ unsigned m_threadWorkersCreated;
+ unsigned m_threadWorkersDone;
+ unsigned m_threadWorkersFailed;
+ unsigned m_maxThreadWorkers;
+
+ unsigned m_eventWorkersCreated;
+ unsigned m_eventWorkersDone;
+ unsigned m_eventWorkersFailed;
+ unsigned m_maxEventWorkers;
+
+ long int m_maxConnections;
+
+ long m_port;
+
+ wxTimer mTimer;
+};
+
+DECLARE_APP(Server);
+
+//thread based worker reads signature and all data first from connected client
+//and resends data to client after reading
+class ThreadWorker : public wxThread
+{
+public:
+ ThreadWorker(wxSocketBase* pSocket);
+ virtual ExitCode Entry();
+private:
+ wxSocketBase* m_socket;
+ wxIPV4address m_peer;
+};
+
+//event based worker reads signature and creates buffer for incoming data.
+//When part of data arrives this worker resends it as soon as possible.
+class EventWorker : public wxEvtHandler
+{
+ DECLARE_EVENT_TABLE();
+public:
+ EventWorker(wxSocketBase* pSock);
+ ~EventWorker();
+private:
+ wxSocketBase* m_socket;
+ wxIPV4address m_peer;
+
+ unsigned char m_signature[2];
+ char* m_inbuf;
+ int m_infill;
+ int m_size;
+ char* m_outbuf;
+ int m_outfill;
+ int m_written;
+
+ void OnSocketEvent(wxSocketEvent& pEvent);
+ void DoWrite();
+ void DoRead();
+};
+
+/******************* Implementation ******************/
+IMPLEMENT_APP_CONSOLE(Server)
+
+#include <wx/listimpl.cpp>
+WX_DEFINE_LIST(TList);
+WX_DEFINE_LIST(EList);
+
+
+void
+Server::OnInitCmdLine(wxCmdLineParser& pParser)
+{
+ wxApp::OnInitCmdLine(pParser);
+ pParser.AddSwitch(wxT("t"),wxT("threads"),_("Use thread based workers only"));
+ pParser.AddSwitch(wxT("e"),wxT("events"),_("Use event based workers only"));
+ pParser.AddOption(wxT("m"),wxT("max"),_("Exit after <n> connections"),wxCMD_LINE_VAL_NUMBER,wxCMD_LINE_PARAM_OPTIONAL);
+ pParser.AddOption(wxT("p"),wxT("port"),_("listen on given port (default 3000)"),wxCMD_LINE_VAL_NUMBER,wxCMD_LINE_PARAM_OPTIONAL);
+}
+
+void
+Server::DumpStatistics()
+{
+ wxString mode;
+ switch(m_workMode)
+ {
+ case EVENTS:
+ mode = _("Event based workers");
+ break;
+ case THREADS:
+ mode = _("Thread based workers");
+ break;
+ case MIXED:
+ mode = _("Event and thread based workers");
+ break;
+ }
+ wxLogMessage(wxString::Format(wxT("Server mode: %s"),mode.c_str()));
+ wxLogMessage(wxString::Format(wxT("\t\t\t\tThreads\tEvents\tTotal")));
+ wxLogMessage(wxString::Format(wxT("Workers created:\t\t%d\t%d\t%d"),m_threadWorkersCreated,m_eventWorkersCreated,m_threadWorkersCreated+m_eventWorkersCreated));
+ wxLogMessage(wxString::Format(wxT("Max concurrent workers:\t%d\t%d\t%d"),m_maxThreadWorkers,m_maxEventWorkers,m_maxThreadWorkers+m_maxEventWorkers));
+ wxLogMessage(wxString::Format(wxT("Workers failed:\t\t%d\t%d\t%d"),m_threadWorkersFailed,m_eventWorkersFailed,m_threadWorkersFailed+m_eventWorkersFailed));
+ wxLogMessage(wxString::Format(wxT("Workers done:\t\t%d\t%d\t%d"),m_threadWorkersDone,m_eventWorkersDone,m_threadWorkersDone+m_eventWorkersDone));
+
+ if ((int)(m_threadWorkersDone+m_eventWorkersDone) == m_maxConnections)
+ {
+ wxLogMessage(wxT("%d connection(s) served, exiting"),m_maxConnections);
+ ExitMainLoop();
+ }
+}
+
+
+bool
+Server::OnCmdLineParsed(wxCmdLineParser& pParser)
+{
+ if (pParser.Found(_("verbose")))
+ {
+ wxLog::AddTraceMask(wxT("wxSocket"));
+ wxLog::AddTraceMask(wxT("epolldispatcher"));
+ wxLog::AddTraceMask(wxT("selectdispatcher"));
+ wxLog::AddTraceMask(wxT("thread"));
+ wxLog::AddTraceMask(wxT("events"));
+ wxLog::AddTraceMask(wxT("timer"));
+ }
+
+ if (pParser.Found(wxT("m"),&m_maxConnections))
+ {
+ wxLogMessage(wxT("%d connection(s) to exit"),m_maxConnections);
+ }
+
+ if (pParser.Found(wxT("p"),&m_port))
+ {
+ wxLogMessage(wxT("%d connection(s) to exit"),m_maxConnections);
+ }
+
+ if (pParser.Found(wxT("t")))
+ m_workMode = THREADS;
+ else if (pParser.Found(wxT("e")))
+ m_workMode = EVENTS;
+ else
+ m_workMode = MIXED;
+
+ return wxApp::OnCmdLineParsed(pParser);
+}
+
+bool Server::OnInit()
+{
+ wxLog* logger = new wxLogStderr();
+ wxLog::SetActiveTarget(logger);
+
+ m_port = 3000;
+
+ //send interesting things to console
+ if (!wxApp::OnInit())
+ return false;
+
+ //setup listening socket
+ wxIPV4address la;
+ la.Service(m_port);
+ m_listeningSocket = new wxSocketServer(la,wxSOCKET_NOWAIT|wxSOCKET_REUSEADDR);
+ m_listeningSocket->SetEventHandler(*this);
+ m_listeningSocket->SetNotify(wxSOCKET_CONNECTION_FLAG);
+ m_listeningSocket->Notify(true);
+ if (!m_listeningSocket->Ok())
+ {
+ wxLogError(wxT("Cannot bind listening socket"));
+ return false;
+ }
+
+ m_threadWorkersCreated = 0;
+ m_threadWorkersDone = 0;
+ m_threadWorkersFailed = 0;
+ m_maxThreadWorkers = 0;
+
+ m_eventWorkersCreated = 0;
+ m_eventWorkersDone = 0;
+ m_eventWorkersFailed = 0;
+ m_maxEventWorkers = 0;
+
+ wxLogMessage(wxT("Server listening at port %d, waiting for connections"), m_port);
+ return true;
+}
+
+
+int Server::OnExit()
+{
+ for(TList::compatibility_iterator it = m_threadWorkers.GetFirst(); it ; it = it->GetNext()) {
+ it->GetData()->Wait();
+ delete it->GetData();
+ }
+
+ for(EList::compatibility_iterator it = m_eventWorkers.GetFirst(); it ; it->GetNext()) {
+ delete it->GetData();
+ }
+
+ m_threadWorkers.Clear();
+ m_eventWorkers.Clear();
+ m_listeningSocket->Destroy();
+ return 0;
+}
+
+void Server::OnSocketEvent(wxSocketEvent& pEvent)
+{
+ switch(pEvent.GetSocketEvent())
+ {
+ case wxSOCKET_INPUT:
+ wxLogError(wxT("Unexpected wxSOCKET_INPUT in wxSocketServer"));
+ break;
+ case wxSOCKET_OUTPUT:
+ wxLogError(wxT("Unexpected wxSOCKET_OUTPUT in wxSocketServer"));
+ break;
+ case wxSOCKET_CONNECTION:
+ {
+ wxSocketBase* sock = m_listeningSocket->Accept();
+ wxIPV4address addr;
+ if (!sock->GetPeer(addr))
+ {
+ wxLogError(wxT("Server: cannot get peer info"));
+ } else {
+ wxLogMessage(wxT("Got connection from %s:%d"),addr.IPAddress().c_str(), addr.Service());
+ }
+ bool createThread;
+
+ if (m_workMode != MIXED)
+ createThread = m_workMode == THREADS;
+ else
+ createThread = (wxDateTime::Now().GetSecond())%2 == 0;
+
+ if (createThread)
+ {
+ ThreadWorker* c = new ThreadWorker(sock);
+ if (c->Create() == wxTHREAD_NO_ERROR)
+ {
+ m_threadWorkers.Append(c);
+ if (m_threadWorkers.GetCount() > m_maxThreadWorkers)
+ m_maxThreadWorkers++;
+ m_threadWorkersCreated++;
+ c->Run();
+ }
+ else
+ {
+ wxLogError(wxT("Server: cannot create next thread (current threads: %d"), m_threadWorkers.size());
+ };
+ }
+ else
+ {
+ EventWorker* w = new EventWorker(sock);
+ m_eventWorkers.Append(w);
+ if (m_eventWorkers.GetCount() > m_maxEventWorkers)
+ m_maxEventWorkers++;
+ m_eventWorkersCreated++;
+ }
+ }
+ break;
+ case wxSOCKET_LOST:
+ wxLogError(wxT("Unexpected wxSOCKET_LOST in wxSocketServer"));
+ break;
+ }
+}
+
+void Server::OnWorkerEvent(WorkerEvent& pEvent)
+{
+ //wxLogMessage(wxT("Got worker event"));
+ for(TList::compatibility_iterator it = m_threadWorkers.GetFirst(); it ; it = it->GetNext())
+ {
+ if (it->GetData() == pEvent.m_sender)
+ {
+ wxLogVerbose(wxT("Deleting thread worker (%d left)"),m_threadWorkers.GetCount());
+ it->GetData()->Wait();
+ delete it->GetData();
+ m_threadWorkers.DeleteNode(it);
+ if (!pEvent.m_workerFailed)
+ m_threadWorkersDone++;
+ else
+ m_threadWorkersFailed++;
+ break;
+ }
+ }
+ for(EList::compatibility_iterator it = m_eventWorkers.GetFirst(); it ; it = it->GetNext())
+ {
+ if (it->GetData() == pEvent.m_sender)
+ {
+ wxLogVerbose(wxT("Deleting event worker (%d left)"),m_eventWorkers.GetCount());
+ delete it->GetData();
+ m_eventWorkers.DeleteNode(it);
+ if (!pEvent.m_workerFailed)
+ m_eventWorkersDone++;
+ else
+ m_eventWorkersFailed++;
+ break;
+ }
+ }
+
+ if (m_eventWorkers.GetCount() == 0 && m_threadWorkers.GetCount() == 0)
+ {
+ mTimer.Start(1000,true);
+ }
+}
+
+void Server::OnTimerEvent(wxTimerEvent&)
+{
+ DumpStatistics();
+}
+
+
+BEGIN_EVENT_TABLE(Server,wxEvtHandler)
+ EVT_SOCKET(wxID_ANY,Server::OnSocketEvent)
+ EVT_WORKER(Server::OnWorkerEvent)
+ EVT_TIMER(wxID_ANY,Server::OnTimerEvent)
+END_EVENT_TABLE()
+
+
+ThreadWorker::ThreadWorker(wxSocketBase* pSocket) : wxThread(wxTHREAD_JOINABLE)
+{
+ m_socket = pSocket;
+ //Notify() cannot be called in thread context. We have to detach from main loop
+ //before switching thread contexts.
+ m_socket->Notify(false);
+ m_socket->SetFlags(wxSOCKET_WAITALL|wxSOCKET_BLOCK);
+ pSocket->GetPeer(m_peer);
+}
+
+wxThread::ExitCode ThreadWorker::Entry()
+{
+ WorkerEvent e(this);
+ if (!m_socket->IsConnected())
+ {
+ LogWorker(m_peer,wxT("ThreadWorker: not connected"),LOG_ERROR);
+ return 0;
+ }
+ int to_process = -1;
+ if (m_socket->IsConnected())
+ {
+ unsigned char signature[2];
+ LogWorker(m_peer,wxT("ThreadWorker: reading for data"));
+ to_process = 2;
+ do
+ {
+ m_socket->Read(&signature,to_process);
+ if (m_socket->Error())
+ {
+ LogWorker(m_peer,wxT("ThreadWorker: Read error"),LOG_ERROR);
+ wxGetApp().AddPendingEvent(e);
+ return 0;
+ }
+ to_process -= m_socket->LastCount();
+ LogWorker(m_peer,wxString::Format(wxT("to_process: %d"),to_process));
+
+ }
+ while (!m_socket->Error() && to_process != 0);
+
+ if (signature[0] == 0)
+ {
+ e.m_exit = true;
+ return 0;
+ }
+
+ if (signature[0] == 0xCE)
+ {
+ LogWorker(m_peer,_("This server does not support test2 from GUI client"));
+ e.m_workerFailed = true;
+ e.m_exit = true;
+ return 0;
+ }
+ int size = signature[1] * (signature[0] == 0xBE ? 1 : 1024);
+ char* buf = new char[size];
+ LogWorker(m_peer,wxString::Format(wxT("Message signature: chunks: %d, kilobytes: %d, size: %d (bytes)"),signature[0],signature[1],size));
+
+ to_process = size;
+ LogWorker(m_peer,wxString::Format(wxT("ThreadWorker: reading %d bytes of data"),to_process));
+
+ do
+ {
+ m_socket->Read(buf,to_process);
+ if (m_socket->Error())
+ {
+ LogWorker(m_peer,wxT("ThreadWorker: Read error"),LOG_ERROR);
+ wxGetApp().AddPendingEvent(e);
+ return 0;
+ }
+ to_process -= m_socket->LastCount();
+ LogWorker(m_peer,wxString::Format(wxT("ThreadWorker: %d bytes readed, %d todo"),m_socket->LastCount(),to_process));
+
+ }
+ while(!m_socket->Error() && to_process != 0);
+
+ to_process = size;
+
+ do
+ {
+ m_socket->Write(buf,to_process);
+ if (m_socket->Error()) {
+ LogWorker(m_peer,wxT("ThreadWorker: Write error"),LOG_ERROR);
+ break;
+ }
+ to_process -= m_socket->LastCount();
+ LogWorker(m_peer,wxString::Format(wxT("ThreadWorker: %d bytes written, %d todo"),m_socket->LastCount(),to_process));
+ }
+ while(!m_socket->Error() && to_process != 0);
+ }
+
+ LogWorker(m_peer,wxT("ThreadWorker: done"));
+ e.m_workerFailed = to_process != 0;
+ m_socket->Destroy();
+ wxGetApp().AddPendingEvent(e);
+ return 0;
+}
+
+EventWorker::EventWorker(wxSocketBase* pSock)
+ : m_socket(pSock),
+ m_inbuf(NULL),
+ m_infill(0),
+ m_outbuf(NULL),
+ m_outfill(0)
+{
+ m_socket->SetNotify(wxSOCKET_LOST_FLAG|wxSOCKET_INPUT_FLAG|wxSOCKET_OUTPUT_FLAG);
+ m_socket->Notify(true);
+ m_socket->SetEventHandler(*this);
+ m_socket->SetFlags(wxSOCKET_NOWAIT);
+ m_socket->GetPeer(m_peer);
+}
+
+EventWorker::~EventWorker() {
+ m_socket->Destroy();
+ delete [] m_inbuf;
+ delete [] m_outbuf;
+}
+
+void
+EventWorker::DoRead()
+{
+ if (m_inbuf == NULL)
+ {
+ //read message header
+ do
+ {
+ m_socket->Read(m_signature,2 - m_infill);
+ if (m_socket->Error()) {
+ if (m_socket->LastError() != wxSOCKET_WOULDBLOCK)
+ {
+ LogWorker(m_peer,wxString::Format(wxT("Read error (%d): %s"),m_socket->LastError(),GetSocketErrorMsg(m_socket->LastError())),LOG_ERROR);
+ m_socket->Close();
+ }
+ }
+ else
+ {
+ m_infill += m_socket->LastCount();
+ if (m_infill == 2) {
+ unsigned char chunks = m_signature[1];
+ unsigned char type = m_signature[0];
+ if (type == 0xCE)
+ {
+ LogWorker(m_peer,_("This server does not support test2 from GUI client"));
+ m_written = -1; //wxSOCKET_LOST will interpret this as failure
+ m_socket->Close();
+ }
+ else if (type == 0xBE || type == 0xDE)
+ {
+ m_size = chunks * (type == 0xBE ? 1 : 1024);
+ m_inbuf = new char[m_size];
+ m_outbuf = new char[m_size];
+ m_infill = 0;
+ m_outfill = 0;
+ m_written = 0;
+ LogWorker(m_peer,wxString::Format(wxT("Message signature: len: %d, type: %s, size: %d (bytes)"),chunks,type == 0xBE ? wxT("b") : wxT("kB"),m_size));
+ break;
+ } else
+ {
+ LogWorker(m_peer,wxString::Format(wxT("Unknown test type %x"),type));
+ m_socket->Close();
+ }
+ }
+ }
+ }
+ while(!m_socket->Error() && (2 - m_infill != 0));
+ }
+
+ if (m_inbuf == NULL)
+ return;
+ //read message data
+ do {
+ if (m_size == m_infill) {
+ m_signature[0] = m_signature[1] = 0x0;
+ delete [] m_inbuf;
+ m_inbuf = NULL;
+ m_infill = 0;
+ return;
+ }
+ m_socket->Read(m_inbuf + m_infill,m_size - m_infill);
+ if (m_socket->Error()) {
+ if (m_socket->LastError() != wxSOCKET_WOULDBLOCK)
+ {
+ LogWorker(
+ m_peer,
+ wxString::Format(wxT("Read error (%d): %s"),
+ m_socket->LastError(),
+ GetSocketErrorMsg(m_socket->LastError())
+ ),
+ LOG_ERROR);
+
+ m_socket->Close();
+ }
+ }
+ else
+ {
+ memcpy(m_outbuf+m_outfill,m_inbuf+m_infill,m_socket->LastCount());
+ m_infill += m_socket->LastCount();
+ m_outfill += m_socket->LastCount();
+ DoWrite();
+ }
+ }
+ while(!m_socket->Error());
+};
+
+void EventWorker::OnSocketEvent(wxSocketEvent& pEvent)
+{
+ switch(pEvent.GetSocketEvent())
+ {
+ case wxSOCKET_INPUT:
+ DoRead();
+ break;
+ case wxSOCKET_OUTPUT:
+ if (m_inbuf != NULL)
+ DoWrite();
+ break;
+ case wxSOCKET_CONNECTION:
+ LogWorker(m_peer,wxString::Format(wxT("Unexpected wxSOCKET_CONNECTION in EventWorker")),LOG_ERROR);
+ break;
+ case wxSOCKET_LOST:
+ {
+ LogWorker(m_peer,wxString::Format(wxT("Connection lost")));
+ WorkerEvent e(this);
+ e.m_workerFailed = m_written != m_size;
+ wxGetApp().AddPendingEvent(e);
+ }
+ break;
+ }
+}
+
+void EventWorker::DoWrite() {
+ do {
+ if (m_written == m_size)
+ {
+ delete [] m_outbuf;
+ m_outbuf = NULL;
+ m_outfill = 0;
+ LogWorker(m_peer,wxString::Format(wxT("All data written")));
+ return;
+ }
+ if (m_outfill - m_written == 0)
+ {
+ return;
+ }
+ m_socket->Write(m_outbuf + m_written,m_outfill - m_written);
+ if (m_socket->Error())
+ {
+ if (m_socket->LastError() != wxSOCKET_WOULDBLOCK)
+ {
+ LogWorker(m_peer,
+ wxString::Format(wxT("Write error (%d): %s"),
+ m_socket->LastError(),
+ GetSocketErrorMsg(m_socket->LastError())
+ )
+ ,LOG_ERROR
+ );
+ m_socket->Close();
+ }
+ else
+ {
+ LogWorker(m_peer,wxString::Format(wxT("Write would block, waiting for OUTPUT event")));
+ }
+ }
+ else
+ {
+ memmove(m_outbuf,m_outbuf+m_socket->LastCount(),m_outfill-m_socket->LastCount());
+ m_written += m_socket->LastCount();
+ }
+ LogWorker(m_peer,wxString::Format(wxT("Written %d of %d bytes, todo %d"),m_socket->LastCount(),m_size,m_size - m_written));
+ }
+ while (!m_socket->Error());
+}
+
+BEGIN_EVENT_TABLE(EventWorker,wxEvtHandler)
+ EVT_SOCKET(wxID_ANY,EventWorker::OnSocketEvent)
+END_EVENT_TABLE()
// --------------------------------------------------------------------------
// the application icon
-#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__)
-# include "mondrian.xpm"
-#endif
+#include "mondrian.xpm"
// --------------------------------------------------------------------------
// classes
SETUPHDIR = \
$(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
CLIENT_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
- $(__OPTIMIZEFLAG) $(__THREADSFLAG_0) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
+ $(__OPTIMIZEFLAG) $(__THREADSFLAG_2) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
$(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include -I. $(__DLLFLAG_p) \
CLIENT_OBJECTS = \
$(OBJS)\client_client.obj
SERVER_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
- $(__OPTIMIZEFLAG) $(__THREADSFLAG_0) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
+ $(__OPTIMIZEFLAG) $(__THREADSFLAG_2) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
$(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
$(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
$(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include -I. $(__DLLFLAG_p) \
-I.\..\..\samples -DNOPCH $(CPPFLAGS) $(CXXFLAGS)
SERVER_OBJECTS = \
$(OBJS)\server_server.obj
+BASECLIENT_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
+ $(__OPTIMIZEFLAG) $(__THREADSFLAG_2) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
+ $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
+ $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
+ $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include -I. $(__DLLFLAG_p) \
+ -DwxUSE_GUI=0 $(CPPFLAGS) $(CXXFLAGS)
+BASECLIENT_OBJECTS = \
+ $(OBJS)\baseclient_baseclient.obj
+BASESERVER_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
+ $(__OPTIMIZEFLAG) $(__THREADSFLAG_2) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
+ $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
+ $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
+ $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include -I. $(__DLLFLAG_p) \
+ -DwxUSE_GUI=0 $(CPPFLAGS) $(CXXFLAGS)
+BASESERVER_OBJECTS = \
+ $(OBJS)\baseserver_baseserver.obj
### Conditionally set variables: ###
!if "$(MONOLITHIC)" == "1"
EXTRALIBS_FOR_BASE =
!endif
+!if "$(USE_GUI)" == "1"
+__client___depname = $(OBJS)\client.exe
+!endif
+!if "$(USE_GUI)" == "1"
+__server___depname = $(OBJS)\server.exe
+!endif
+!if "$(WXUNIV)" == "1"
+__WXUNIV_DEFINE_p_0 = -d__WXUNIVERSAL__
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
+__DEBUG_DEFINE_p_0 = -d__WXDEBUG__
+!endif
+!if "$(DEBUG_FLAG)" == "1"
+__DEBUG_DEFINE_p_0 = -d__WXDEBUG__
+!endif
+!if "$(USE_EXCEPTIONS)" == "0"
+__EXCEPTIONS_DEFINE_p_0 = -dwxNO_EXCEPTIONS
+!endif
+!if "$(USE_RTTI)" == "0"
+__RTTI_DEFINE_p_0 = -dwxNO_RTTI
+!endif
+!if "$(USE_THREADS)" == "0"
+__THREAD_DEFINE_p_0 = -dwxNO_THREADS
+!endif
+!if "$(UNICODE)" == "0"
+__UNICODE_DEFINE_p_0 = -dwxUSE_UNICODE=0
+!endif
+!if "$(UNICODE)" == "1"
+__UNICODE_DEFINE_p_0 = -d_UNICODE
+!endif
+!if "$(MSLU)" == "1"
+__MSLU_DEFINE_p_0 = -dwxUSE_UNICODE_MSLU=1
+!endif
+!if "$(USE_GDIPLUS)" == "1"
+__GFXCTX_DEFINE_p_0 = -dwxUSE_GRAPHICS_CONTEXT=1
+!endif
+!if "$(SHARED)" == "1"
+__DLLFLAG_p_0 = -dWXUSINGDLL
+!endif
+!if "$(MONOLITHIC)" == "0"
+__WXLIB_CORE_p = \
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
+!endif
+!if "$(USE_GUI)" == "1"
+__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
+!endif
+!if "$(USE_GUI)" == "1"
+__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
+!endif
+!if "$(USE_GUI)" == "1"
+__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
+!endif
!if "$(BUILD)" == "debug"
__OPTIMIZEFLAG = -Od
!endif
__THREADSFLAG = mt
!endif
!if "$(USE_THREADS)" == "0"
-__THREADSFLAG_0 =
+__THREADSFLAG_2 =
!endif
!if "$(USE_THREADS)" == "1"
-__THREADSFLAG_0 = -tWM
+__THREADSFLAG_2 = -tWM
!endif
!if "$(RUNTIME_LIBS)" == "dynamic"
__RUNTIME_LIBS = -tWR
__RUNTIME_LIBS =
!endif
!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS_0 = i
+__RUNTIME_LIBS_2 = i
!endif
!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS_0 =
+__RUNTIME_LIBS_2 =
!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
!endif
-!if "$(WXUNIV)" == "1"
-__WXUNIV_DEFINE_p_0 = -d__WXUNIVERSAL__
-!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
__DEBUG_DEFINE_p = -D__WXDEBUG__
!endif
!if "$(DEBUG_FLAG)" == "1"
__DEBUG_DEFINE_p = -D__WXDEBUG__
!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-__DEBUG_DEFINE_p_0 = -d__WXDEBUG__
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-__DEBUG_DEFINE_p_0 = -d__WXDEBUG__
-!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
!endif
-!if "$(USE_EXCEPTIONS)" == "0"
-__EXCEPTIONS_DEFINE_p_0 = -dwxNO_EXCEPTIONS
-!endif
!if "$(USE_RTTI)" == "0"
__RTTI_DEFINE_p = -DwxNO_RTTI
!endif
-!if "$(USE_RTTI)" == "0"
-__RTTI_DEFINE_p_0 = -dwxNO_RTTI
-!endif
!if "$(USE_THREADS)" == "0"
__THREAD_DEFINE_p = -DwxNO_THREADS
!endif
-!if "$(USE_THREADS)" == "0"
-__THREAD_DEFINE_p_0 = -dwxNO_THREADS
-!endif
!if "$(UNICODE)" == "0"
__UNICODE_DEFINE_p = -DwxUSE_UNICODE=0
!endif
!if "$(UNICODE)" == "1"
__UNICODE_DEFINE_p = -D_UNICODE
!endif
-!if "$(UNICODE)" == "0"
-__UNICODE_DEFINE_p_0 = -dwxUSE_UNICODE=0
-!endif
-!if "$(UNICODE)" == "1"
-__UNICODE_DEFINE_p_0 = -d_UNICODE
-!endif
!if "$(MSLU)" == "1"
__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1
!endif
-!if "$(MSLU)" == "1"
-__MSLU_DEFINE_p_0 = -dwxUSE_UNICODE_MSLU=1
-!endif
!if "$(USE_GDIPLUS)" == "1"
__GFXCTX_DEFINE_p = -DwxUSE_GRAPHICS_CONTEXT=1
!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GFXCTX_DEFINE_p_0 = -dwxUSE_GRAPHICS_CONTEXT=1
-!endif
!if "$(SHARED)" == "1"
__DLLFLAG_p = -DWXUSINGDLL
!endif
-!if "$(SHARED)" == "1"
-__DLLFLAG_p_0 = -dWXUSINGDLL
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_CORE_p = \
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
-!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_NET_p = \
wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib
__WXLIB_MONO_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
-!if "$(USE_GUI)" == "1"
-__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
-!endif
!if "$(MSLU)" == "1"
__UNICOWS_LIB_p = unicows.lib
!endif
### Targets: ###
-all: $(OBJS)\client.exe $(OBJS)\server.exe
+all: $(__client___depname) $(__server___depname) $(OBJS)\baseclient.exe $(OBJS)\baseserver.exe
clean:
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
-if exist $(OBJS)\server.ild del $(OBJS)\server.ild
-if exist $(OBJS)\server.ilf del $(OBJS)\server.ilf
-if exist $(OBJS)\server.ils del $(OBJS)\server.ils
+ -if exist $(OBJS)\baseclient.exe del $(OBJS)\baseclient.exe
+ -if exist $(OBJS)\baseclient.tds del $(OBJS)\baseclient.tds
+ -if exist $(OBJS)\baseclient.ilc del $(OBJS)\baseclient.ilc
+ -if exist $(OBJS)\baseclient.ild del $(OBJS)\baseclient.ild
+ -if exist $(OBJS)\baseclient.ilf del $(OBJS)\baseclient.ilf
+ -if exist $(OBJS)\baseclient.ils del $(OBJS)\baseclient.ils
+ -if exist $(OBJS)\baseserver.exe del $(OBJS)\baseserver.exe
+ -if exist $(OBJS)\baseserver.tds del $(OBJS)\baseserver.tds
+ -if exist $(OBJS)\baseserver.ilc del $(OBJS)\baseserver.ilc
+ -if exist $(OBJS)\baseserver.ild del $(OBJS)\baseserver.ild
+ -if exist $(OBJS)\baseserver.ilf del $(OBJS)\baseserver.ilf
+ -if exist $(OBJS)\baseserver.ils del $(OBJS)\baseserver.ils
+!if "$(USE_GUI)" == "1"
$(OBJS)\client.exe: $(CLIENT_OBJECTS) $(OBJS)\client_client.res
ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&|
- c0w32.obj $(CLIENT_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_0).lib,, $(OBJS)\client_client.res
+ c0w32.obj $(CLIENT_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_2).lib,, $(OBJS)\client_client.res
|
+!endif
+!if "$(USE_GUI)" == "1"
$(OBJS)\server.exe: $(SERVER_OBJECTS) $(OBJS)\server_server.res
ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&|
- c0w32.obj $(SERVER_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_0).lib,, $(OBJS)\server_server.res
+ c0w32.obj $(SERVER_OBJECTS),$@,, $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_2).lib,, $(OBJS)\server_server.res
+|
+!endif
+
+$(OBJS)\baseclient.exe: $(BASECLIENT_OBJECTS)
+ ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -ap @&&|
+ c0x32.obj $(BASECLIENT_OBJECTS),$@,, $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_2).lib,,
+|
+
+$(OBJS)\baseserver.exe: $(BASESERVER_OBJECTS)
+ ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -ap @&&|
+ c0x32.obj $(BASESERVER_OBJECTS),$@,, $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG)$(__RUNTIME_LIBS_2).lib,,
|
$(OBJS)\client_client.obj: .\client.cpp
$(OBJS)\server_server.res: .\server.rc
brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) $(__MSLU_DEFINE_p_0) $(__GFXCTX_DEFINE_p_0) -i$(SETUPHDIR) -i.\..\..\include -i. $(__DLLFLAG_p_0) -i.\..\..\samples -dNOPCH $**
+$(OBJS)\baseclient_baseclient.obj: .\baseclient.cpp
+ $(CXX) -q -c -P -o$@ $(BASECLIENT_CXXFLAGS) $**
+
+$(OBJS)\baseserver_baseserver.obj: .\baseserver.cpp
+ $(CXX) -q -c -P -o$@ $(BASESERVER_CXXFLAGS) $**
+
SERVER_OBJECTS = \
$(OBJS)\server_server.o \
$(OBJS)\server_server_rc.o
+BASECLIENT_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \
+ $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
+ $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
+ $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
+ $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include -W -Wall -I. \
+ $(__DLLFLAG_p) -DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \
+ -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
+BASECLIENT_OBJECTS = \
+ $(OBJS)\baseclient_baseclient.o
+BASESERVER_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \
+ $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
+ $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
+ $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
+ $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include -W -Wall -I. \
+ $(__DLLFLAG_p) -DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \
+ -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
+BASESERVER_OBJECTS = \
+ $(OBJS)\baseserver_baseserver.o
### Conditionally set variables: ###
ifeq ($(MONOLITHIC),1)
EXTRALIBS_FOR_BASE =
endif
+ifeq ($(USE_GUI),1)
+__client___depname = $(OBJS)\client.exe
+endif
+ifeq ($(USE_GUI),1)
+__server___depname = $(OBJS)\server.exe
+endif
+ifeq ($(WXUNIV),1)
+__WXUNIV_DEFINE_p_0 = --define __WXUNIVERSAL__
+endif
+ifeq ($(BUILD),debug)
+ifeq ($(DEBUG_FLAG),default)
+__DEBUG_DEFINE_p_0 = --define __WXDEBUG__
+endif
+endif
+ifeq ($(DEBUG_FLAG),1)
+__DEBUG_DEFINE_p_0 = --define __WXDEBUG__
+endif
+ifeq ($(USE_EXCEPTIONS),0)
+__EXCEPTIONS_DEFINE_p_0 = --define wxNO_EXCEPTIONS
+endif
+ifeq ($(USE_RTTI),0)
+__RTTI_DEFINE_p_0 = --define wxNO_RTTI
+endif
+ifeq ($(USE_THREADS),0)
+__THREAD_DEFINE_p_0 = --define wxNO_THREADS
+endif
+ifeq ($(UNICODE),0)
+__UNICODE_DEFINE_p_0 = --define wxUSE_UNICODE=0
+endif
+ifeq ($(UNICODE),1)
+__UNICODE_DEFINE_p_0 = --define _UNICODE
+endif
+ifeq ($(MSLU),1)
+__MSLU_DEFINE_p_0 = --define wxUSE_UNICODE_MSLU=1
+endif
+ifeq ($(USE_GDIPLUS),1)
+__GFXCTX_DEFINE_p_0 = --define wxUSE_GRAPHICS_CONTEXT=1
+endif
+ifeq ($(SHARED),1)
+__DLLFLAG_p_0 = --define WXUSINGDLL
+endif
+ifeq ($(MONOLITHIC),0)
+__WXLIB_CORE_p = \
+ -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
+endif
+ifeq ($(USE_GUI),1)
+__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
+endif
+ifeq ($(USE_GUI),1)
+__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
+endif
+ifeq ($(USE_GUI),1)
+__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
+endif
ifeq ($(BUILD),debug)
__OPTIMIZEFLAG = -O0
endif
ifeq ($(WXUNIV),1)
__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
endif
-ifeq ($(WXUNIV),1)
-__WXUNIV_DEFINE_p_0 = --define __WXUNIVERSAL__
-endif
ifeq ($(BUILD),debug)
ifeq ($(DEBUG_FLAG),default)
__DEBUG_DEFINE_p = -D__WXDEBUG__
ifeq ($(DEBUG_FLAG),1)
__DEBUG_DEFINE_p = -D__WXDEBUG__
endif
-ifeq ($(BUILD),debug)
-ifeq ($(DEBUG_FLAG),default)
-__DEBUG_DEFINE_p_0 = --define __WXDEBUG__
-endif
-endif
-ifeq ($(DEBUG_FLAG),1)
-__DEBUG_DEFINE_p_0 = --define __WXDEBUG__
-endif
ifeq ($(USE_EXCEPTIONS),0)
__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
endif
-ifeq ($(USE_EXCEPTIONS),0)
-__EXCEPTIONS_DEFINE_p_0 = --define wxNO_EXCEPTIONS
-endif
ifeq ($(USE_RTTI),0)
__RTTI_DEFINE_p = -DwxNO_RTTI
endif
-ifeq ($(USE_RTTI),0)
-__RTTI_DEFINE_p_0 = --define wxNO_RTTI
-endif
ifeq ($(USE_THREADS),0)
__THREAD_DEFINE_p = -DwxNO_THREADS
endif
-ifeq ($(USE_THREADS),0)
-__THREAD_DEFINE_p_0 = --define wxNO_THREADS
-endif
ifeq ($(UNICODE),0)
__UNICODE_DEFINE_p = -DwxUSE_UNICODE=0
endif
ifeq ($(UNICODE),1)
__UNICODE_DEFINE_p = -D_UNICODE
endif
-ifeq ($(UNICODE),0)
-__UNICODE_DEFINE_p_0 = --define wxUSE_UNICODE=0
-endif
-ifeq ($(UNICODE),1)
-__UNICODE_DEFINE_p_0 = --define _UNICODE
-endif
ifeq ($(MSLU),1)
__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1
endif
-ifeq ($(MSLU),1)
-__MSLU_DEFINE_p_0 = --define wxUSE_UNICODE_MSLU=1
-endif
ifeq ($(USE_GDIPLUS),1)
__GFXCTX_DEFINE_p = -DwxUSE_GRAPHICS_CONTEXT=1
endif
-ifeq ($(USE_GDIPLUS),1)
-__GFXCTX_DEFINE_p_0 = --define wxUSE_GRAPHICS_CONTEXT=1
-endif
ifeq ($(SHARED),1)
__DLLFLAG_p = -DWXUSINGDLL
endif
-ifeq ($(SHARED),1)
-__DLLFLAG_p_0 = --define WXUSINGDLL
-endif
-ifeq ($(MONOLITHIC),0)
-__WXLIB_CORE_p = \
- -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
-endif
ifeq ($(MONOLITHIC),0)
__WXLIB_NET_p = \
-lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net
__WXLIB_MONO_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
endif
-ifeq ($(USE_GUI),1)
-__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
-endif
-ifeq ($(USE_GUI),1)
-__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
-endif
-ifeq ($(USE_GUI),1)
-__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
-endif
ifeq ($(MSLU),1)
__UNICOWS_LIB_p = -lunicows
endif
### Targets: ###
-all: $(OBJS)\client.exe $(OBJS)\server.exe
+all: $(__client___depname) $(__server___depname) $(OBJS)\baseclient.exe $(OBJS)\baseserver.exe
clean:
-if exist $(OBJS)\*.o del $(OBJS)\*.o
-if exist $(OBJS)\*.d del $(OBJS)\*.d
-if exist $(OBJS)\client.exe del $(OBJS)\client.exe
-if exist $(OBJS)\server.exe del $(OBJS)\server.exe
+ -if exist $(OBJS)\baseclient.exe del $(OBJS)\baseclient.exe
+ -if exist $(OBJS)\baseserver.exe del $(OBJS)\baseserver.exe
+ifeq ($(USE_GUI),1)
$(OBJS)\client.exe: $(CLIENT_OBJECTS) $(OBJS)\client_client_rc.o
$(CXX) -o $@ $(CLIENT_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
+endif
+ifeq ($(USE_GUI),1)
$(OBJS)\server.exe: $(SERVER_OBJECTS) $(OBJS)\server_server_rc.o
$(CXX) -o $@ $(SERVER_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
+endif
+
+$(OBJS)\baseclient.exe: $(BASECLIENT_OBJECTS)
+ $(CXX) -o $@ $(BASECLIENT_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
+
+$(OBJS)\baseserver.exe: $(BASESERVER_OBJECTS)
+ $(CXX) -o $@ $(BASESERVER_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
$(OBJS)\client_client.o: ./client.cpp
$(CXX) -c -o $@ $(CLIENT_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\server_server_rc.o: ./server.rc
windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) $(__MSLU_DEFINE_p_0) $(__GFXCTX_DEFINE_p_0) --include-dir $(SETUPHDIR) --include-dir ./../../include --include-dir . $(__DLLFLAG_p_0) --include-dir ./../../samples --define NOPCH
+$(OBJS)\baseclient_baseclient.o: ./baseclient.cpp
+ $(CXX) -c -o $@ $(BASECLIENT_CXXFLAGS) $(CPPDEPS) $<
+
+$(OBJS)\baseserver_baseserver.o: ./baseserver.cpp
+ $(CXX) -c -o $@ $(BASESERVER_CXXFLAGS) $(CPPDEPS) $<
+
.PHONY: all clean
$(CXXFLAGS)
SERVER_OBJECTS = \
server_server.o
+BASECLIENT_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` \
+ $(CPPFLAGS) $(CXXFLAGS)
+BASECLIENT_OBJECTS = \
+ baseclient_baseclient.o
+BASESERVER_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` \
+ $(CPPFLAGS) $(CXXFLAGS)
+BASESERVER_OBJECTS = \
+ baseserver_baseserver.o
### Conditionally set variables: ###
### Targets: ###
-all: test_for_selected_wxbuild client server
+all: test_for_selected_wxbuild client server baseclient baseserver
install: all
rm -f ./*.d
rm -f client
rm -f server
+ rm -f baseclient
+ rm -f baseserver
test_for_selected_wxbuild:
@$(WX_CONFIG) $(WX_CONFIG_FLAGS)
server: $(SERVER_OBJECTS)
$(CXX) -o $@ $(SERVER_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs core,net,base`
+baseclient: $(BASECLIENT_OBJECTS)
+ $(CXX) -o $@ $(BASECLIENT_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs net,base`
+
+baseserver: $(BASESERVER_OBJECTS)
+ $(CXX) -o $@ $(BASESERVER_OBJECTS) $(LDFLAGS) `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs net,base`
+
client_client.o: ./client.cpp
$(CXX) -c -o $@ $(CLIENT_CXXFLAGS) $(CPPDEPS) $<
server_server.o: ./server.cpp
$(CXX) -c -o $@ $(SERVER_CXXFLAGS) $(CPPDEPS) $<
+baseclient_baseclient.o: ./baseclient.cpp
+ $(CXX) -c -o $@ $(BASECLIENT_CXXFLAGS) $(CPPDEPS) $<
+
+baseserver_baseserver.o: ./baseserver.cpp
+ $(CXX) -c -o $@ $(BASESERVER_CXXFLAGS) $(CPPDEPS) $<
+
.PHONY: all install uninstall clean
SERVER_OBJECTS = \
$(OBJS)\server_server.obj \
$(OBJS)\server_server.res
+BASECLIENT_CXXFLAGS = /M$(__RUNTIME_LIBS_36)$(__DEBUGRUNTIME) /DWIN32 \
+ $(__DEBUGINFO) /Fd$(OBJS)\baseclient.pdb $(____DEBUGRUNTIME) \
+ $(__OPTIMIZEFLAG) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \
+ $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
+ $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
+ $(__GFXCTX_DEFINE_p) /I$(SETUPHDIR) /I.\..\..\include /W4 /I. $(__DLLFLAG_p) \
+ /D_CONSOLE /DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) \
+ $(CXXFLAGS)
+BASECLIENT_OBJECTS = \
+ $(OBJS)\baseclient_baseclient.obj
+BASESERVER_CXXFLAGS = /M$(__RUNTIME_LIBS_50)$(__DEBUGRUNTIME) /DWIN32 \
+ $(__DEBUGINFO) /Fd$(OBJS)\baseserver.pdb $(____DEBUGRUNTIME) \
+ $(__OPTIMIZEFLAG) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \
+ $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
+ $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
+ $(__GFXCTX_DEFINE_p) /I$(SETUPHDIR) /I.\..\..\include /W4 /I. $(__DLLFLAG_p) \
+ /D_CONSOLE /DwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) \
+ $(CXXFLAGS)
+BASESERVER_OBJECTS = \
+ $(OBJS)\baseserver_baseserver.obj
### Conditionally set variables: ###
!if "$(MONOLITHIC)" == "1"
EXTRALIBS_FOR_BASE =
!endif
+!if "$(USE_GUI)" == "1"
+__client___depname = $(OBJS)\client.exe
+!endif
!if "$(RUNTIME_LIBS)" == "dynamic"
__RUNTIME_LIBS_8 = D
!endif
!if "$(RUNTIME_LIBS)" == "static"
__RUNTIME_LIBS_8 = $(__THREADSFLAG)
!endif
+!if "$(USE_GUI)" == "1"
+__server___depname = $(OBJS)\server.exe
+!endif
!if "$(RUNTIME_LIBS)" == "dynamic"
__RUNTIME_LIBS_22 = D
!endif
!if "$(RUNTIME_LIBS)" == "static"
__RUNTIME_LIBS_22 = $(__THREADSFLAG)
!endif
+!if "$(RUNTIME_LIBS)" == "dynamic"
+__RUNTIME_LIBS_36 = D
+!endif
+!if "$(RUNTIME_LIBS)" == "static"
+__RUNTIME_LIBS_36 = $(__THREADSFLAG)
+!endif
+!if "$(RUNTIME_LIBS)" == "dynamic"
+__RUNTIME_LIBS_50 = D
+!endif
+!if "$(RUNTIME_LIBS)" == "static"
+__RUNTIME_LIBS_50 = $(__THREADSFLAG)
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+____DEBUGRUNTIME_0 = /d _DEBUG
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+____DEBUGRUNTIME_0 =
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "0"
+____DEBUGRUNTIME_0 =
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "1"
+____DEBUGRUNTIME_0 = /d _DEBUG
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
+__NO_VC_CRTDBG_p_0 = /d __NO_VC_CRTDBG__
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
+__NO_VC_CRTDBG_p_0 = /d __NO_VC_CRTDBG__
+!endif
+!if "$(WXUNIV)" == "1"
+__WXUNIV_DEFINE_p_0 = /d __WXUNIVERSAL__
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
+__DEBUG_DEFINE_p_0 = /d __WXDEBUG__
+!endif
+!if "$(DEBUG_FLAG)" == "1"
+__DEBUG_DEFINE_p_0 = /d __WXDEBUG__
+!endif
+!if "$(USE_EXCEPTIONS)" == "0"
+__EXCEPTIONS_DEFINE_p_0 = /d wxNO_EXCEPTIONS
+!endif
+!if "$(USE_RTTI)" == "0"
+__RTTI_DEFINE_p_0 = /d wxNO_RTTI
+!endif
+!if "$(USE_THREADS)" == "0"
+__THREAD_DEFINE_p_0 = /d wxNO_THREADS
+!endif
+!if "$(UNICODE)" == "0"
+__UNICODE_DEFINE_p_0 = /d wxUSE_UNICODE=0
+!endif
+!if "$(UNICODE)" == "1"
+__UNICODE_DEFINE_p_0 = /d _UNICODE
+!endif
+!if "$(MSLU)" == "1"
+__MSLU_DEFINE_p_0 = /d wxUSE_UNICODE_MSLU=1
+!endif
+!if "$(USE_GDIPLUS)" == "1"
+__GFXCTX_DEFINE_p_0 = /d wxUSE_GRAPHICS_CONTEXT=1
+!endif
+!if "$(SHARED)" == "1"
+__DLLFLAG_p_0 = /d WXUSINGDLL
+!endif
+!if "$(MONOLITHIC)" == "0"
+__WXLIB_CORE_p = \
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
+!endif
+!if "$(USE_GUI)" == "1"
+__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
+!endif
+!if "$(USE_GUI)" == "1"
+__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
+!endif
+!if "$(USE_GUI)" == "1"
+__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
+!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
__DEBUGINFO = /Zi
!endif
__DEBUGINFO = /Zi
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_1 = /DEBUG
+__DEBUGINFO_3 = /DEBUG
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_1 =
+__DEBUGINFO_3 =
!endif
!if "$(DEBUG_INFO)" == "0"
-__DEBUGINFO_1 =
+__DEBUGINFO_3 =
!endif
!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO_1 = /DEBUG
+__DEBUGINFO_3 = /DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
____DEBUGRUNTIME = /D_DEBUG
____DEBUGRUNTIME = /D_DEBUG
!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-____DEBUGRUNTIME_0 = /d _DEBUG
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-____DEBUGRUNTIME_0 =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "0"
-____DEBUGRUNTIME_0 =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "1"
-____DEBUGRUNTIME_0 = /d _DEBUG
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
__DEBUGRUNTIME = d
!endif
!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
-__NO_VC_CRTDBG_p_0 = /d __NO_VC_CRTDBG__
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
-__NO_VC_CRTDBG_p_0 = /d __NO_VC_CRTDBG__
-!endif
!if "$(WXUNIV)" == "1"
__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
!endif
-!if "$(WXUNIV)" == "1"
-__WXUNIV_DEFINE_p_0 = /d __WXUNIVERSAL__
-!endif
!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
__DEBUG_DEFINE_p = /D__WXDEBUG__
!endif
!if "$(DEBUG_FLAG)" == "1"
__DEBUG_DEFINE_p = /D__WXDEBUG__
!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-__DEBUG_DEFINE_p_0 = /d __WXDEBUG__
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-__DEBUG_DEFINE_p_0 = /d __WXDEBUG__
-!endif
!if "$(USE_EXCEPTIONS)" == "0"
__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
!endif
-!if "$(USE_EXCEPTIONS)" == "0"
-__EXCEPTIONS_DEFINE_p_0 = /d wxNO_EXCEPTIONS
-!endif
!if "$(USE_RTTI)" == "0"
__RTTI_DEFINE_p = /DwxNO_RTTI
!endif
-!if "$(USE_RTTI)" == "0"
-__RTTI_DEFINE_p_0 = /d wxNO_RTTI
-!endif
!if "$(USE_THREADS)" == "0"
__THREAD_DEFINE_p = /DwxNO_THREADS
!endif
-!if "$(USE_THREADS)" == "0"
-__THREAD_DEFINE_p_0 = /d wxNO_THREADS
-!endif
!if "$(UNICODE)" == "0"
__UNICODE_DEFINE_p = /DwxUSE_UNICODE=0
!endif
!if "$(UNICODE)" == "1"
__UNICODE_DEFINE_p = /D_UNICODE
!endif
-!if "$(UNICODE)" == "0"
-__UNICODE_DEFINE_p_0 = /d wxUSE_UNICODE=0
-!endif
-!if "$(UNICODE)" == "1"
-__UNICODE_DEFINE_p_0 = /d _UNICODE
-!endif
!if "$(MSLU)" == "1"
__MSLU_DEFINE_p = /DwxUSE_UNICODE_MSLU=1
!endif
-!if "$(MSLU)" == "1"
-__MSLU_DEFINE_p_0 = /d wxUSE_UNICODE_MSLU=1
-!endif
!if "$(USE_GDIPLUS)" == "1"
__GFXCTX_DEFINE_p = /DwxUSE_GRAPHICS_CONTEXT=1
!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GFXCTX_DEFINE_p_0 = /d wxUSE_GRAPHICS_CONTEXT=1
-!endif
!if "$(SHARED)" == "1"
__DLLFLAG_p = /DWXUSINGDLL
!endif
-!if "$(SHARED)" == "1"
-__DLLFLAG_p_0 = /d WXUSINGDLL
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_CORE_p = \
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
-!endif
!if "$(MONOLITHIC)" == "0"
__WXLIB_NET_p = \
wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib
__WXLIB_MONO_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
!endif
-!if "$(USE_GUI)" == "1"
-__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
-!endif
!if "$(MSLU)" == "1"
__UNICOWS_LIB_p = unicows.lib
!endif
### Targets: ###
-all: $(OBJS)\client.exe $(OBJS)\server.exe
+all: $(__client___depname) $(__server___depname) $(OBJS)\baseclient.exe $(OBJS)\baseserver.exe
clean:
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
-if exist $(OBJS)\server.exe del $(OBJS)\server.exe
-if exist $(OBJS)\server.ilk del $(OBJS)\server.ilk
-if exist $(OBJS)\server.pdb del $(OBJS)\server.pdb
+ -if exist $(OBJS)\baseclient.exe del $(OBJS)\baseclient.exe
+ -if exist $(OBJS)\baseclient.ilk del $(OBJS)\baseclient.ilk
+ -if exist $(OBJS)\baseclient.pdb del $(OBJS)\baseclient.pdb
+ -if exist $(OBJS)\baseserver.exe del $(OBJS)\baseserver.exe
+ -if exist $(OBJS)\baseserver.ilk del $(OBJS)\baseserver.ilk
+ -if exist $(OBJS)\baseserver.pdb del $(OBJS)\baseserver.pdb
+!if "$(USE_GUI)" == "1"
$(OBJS)\client.exe: $(CLIENT_OBJECTS) $(OBJS)\client_client.res
- link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<<
+ link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_3) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<<
$(CLIENT_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib
<<
+!endif
+!if "$(USE_GUI)" == "1"
$(OBJS)\server.exe: $(SERVER_OBJECTS) $(OBJS)\server_server.res
- link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<<
+ link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_3) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<<
$(SERVER_OBJECTS) $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib
<<
+!endif
+
+$(OBJS)\baseclient.exe: $(BASECLIENT_OBJECTS)
+ link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_3) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE @<<
+ $(BASECLIENT_OBJECTS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib
+<<
+
+$(OBJS)\baseserver.exe: $(BASESERVER_OBJECTS)
+ link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_3) $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE @<<
+ $(BASESERVER_OBJECTS) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib
+<<
$(OBJS)\client_client.obj: .\client.cpp
$(CXX) /c /nologo /TP /Fo$@ $(CLIENT_CXXFLAGS) $**
$(OBJS)\server_server.res: .\server.rc
rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_0) $(__NO_VC_CRTDBG_p_0) /d __WXMSW__ $(__WXUNIV_DEFINE_p_0) $(__DEBUG_DEFINE_p_0) $(__EXCEPTIONS_DEFINE_p_0) $(__RTTI_DEFINE_p_0) $(__THREAD_DEFINE_p_0) $(__UNICODE_DEFINE_p_0) $(__MSLU_DEFINE_p_0) $(__GFXCTX_DEFINE_p_0) /i $(SETUPHDIR) /i .\..\..\include /i . $(__DLLFLAG_p_0) /d _WINDOWS /i .\..\..\samples /d NOPCH $**
+$(OBJS)\baseclient_baseclient.obj: .\baseclient.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(BASECLIENT_CXXFLAGS) $**
+
+$(OBJS)\baseserver_baseserver.obj: .\baseserver.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(BASESERVER_CXXFLAGS) $**
+
!ifeq MONOLITHIC 1
EXTRALIBS_FOR_BASE =
!endif
+__client___depname =
+!ifeq USE_GUI 1
+__client___depname = $(OBJS)\client.exe
+!endif
+__server___depname =
+!ifeq USE_GUI 1
+__server___depname = $(OBJS)\server.exe
+!endif
+__WXLIB_CORE_p =
+!ifeq MONOLITHIC 0
+__WXLIB_CORE_p = &
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
+!endif
+__LIB_TIFF_p =
+!ifeq USE_GUI 1
+__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
+!endif
+__LIB_JPEG_p =
+!ifeq USE_GUI 1
+__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
+!endif
+__LIB_PNG_p =
+!ifeq USE_GUI 1
+__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
+!endif
__DEBUGINFO =
!ifeq BUILD debug
!ifeq DEBUG_INFO default
!ifeq DEBUG_INFO 1
__DEBUGINFO = -d2
!endif
-__DEBUGINFO_1 =
+__DEBUGINFO_3 =
!ifeq BUILD debug
!ifeq DEBUG_INFO default
-__DEBUGINFO_1 = debug all
+__DEBUGINFO_3 = debug all
!endif
!endif
!ifeq BUILD release
!ifeq DEBUG_INFO default
-__DEBUGINFO_1 =
+__DEBUGINFO_3 =
!endif
!endif
!ifeq DEBUG_INFO 0
-__DEBUGINFO_1 =
+__DEBUGINFO_3 =
!endif
!ifeq DEBUG_INFO 1
-__DEBUGINFO_1 = debug all
+__DEBUGINFO_3 = debug all
!endif
__OPTIMIZEFLAG =
!ifeq BUILD debug
!ifeq USE_EXCEPTIONS 1
__EXCEPTIONSFLAG = -xs
!endif
-__WXLIB_CORE_p =
-!ifeq MONOLITHIC 0
-__WXLIB_CORE_p = &
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
-!endif
-__WXLIB_NET_p =
-!ifeq MONOLITHIC 0
-__WXLIB_NET_p = &
- wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib
-!endif
-__WXLIB_BASE_p =
-!ifeq MONOLITHIC 0
-__WXLIB_BASE_p = &
- wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-__WXLIB_MONO_p =
-!ifeq MONOLITHIC 1
-__WXLIB_MONO_p = &
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-__LIB_TIFF_p =
-!ifeq USE_GUI 1
-__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
-!endif
-__LIB_JPEG_p =
-!ifeq USE_GUI 1
-__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
-!endif
-__LIB_PNG_p =
-!ifeq USE_GUI 1
-__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
-!endif
-__GDIPLUS_LIB_p =
-!ifeq USE_GDIPLUS 1
-__GDIPLUS_LIB_p = gdiplus.lib
-!endif
__WXUNIV_DEFINE_p =
!ifeq WXUNIV 1
__WXUNIV_DEFINE_p = -d__WXUNIVERSAL__
!ifeq SHARED 1
__DLLFLAG_p = -dWXUSINGDLL
!endif
+__WXLIB_NET_p =
+!ifeq MONOLITHIC 0
+__WXLIB_NET_p = &
+ wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net.lib
+!endif
+__WXLIB_BASE_p =
+!ifeq MONOLITHIC 0
+__WXLIB_BASE_p = &
+ wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
+!endif
+__WXLIB_MONO_p =
+!ifeq MONOLITHIC 1
+__WXLIB_MONO_p = &
+ wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
+!endif
+__GDIPLUS_LIB_p =
+!ifeq USE_GDIPLUS 1
+__GDIPLUS_LIB_p = gdiplus.lib
+!endif
### Variables: ###
$(CXXFLAGS)
SERVER_OBJECTS = &
$(OBJS)\server_server.obj
+BASECLIENT_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
+ $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
+ $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) &
+ $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) &
+ -i=.\..\..\include -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) &
+ -dwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
+BASECLIENT_OBJECTS = &
+ $(OBJS)\baseclient_baseclient.obj
+BASESERVER_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
+ $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
+ $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) &
+ $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) &
+ -i=.\..\..\include -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) &
+ -dwxUSE_GUI=0 $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
+BASESERVER_OBJECTS = &
+ $(OBJS)\baseserver_baseserver.obj
all : $(OBJS)
### Targets: ###
-all : .SYMBOLIC $(OBJS)\client.exe $(OBJS)\server.exe
+all : .SYMBOLIC $(__client___depname) $(__server___depname) $(OBJS)\baseclient.exe $(OBJS)\baseserver.exe
clean : .SYMBOLIC
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
-if exist $(OBJS)\*.pch del $(OBJS)\*.pch
-if exist $(OBJS)\client.exe del $(OBJS)\client.exe
-if exist $(OBJS)\server.exe del $(OBJS)\server.exe
+ -if exist $(OBJS)\baseclient.exe del $(OBJS)\baseclient.exe
+ -if exist $(OBJS)\baseserver.exe del $(OBJS)\baseserver.exe
+!ifeq USE_GUI 1
$(OBJS)\client.exe : $(CLIENT_OBJECTS) $(OBJS)\client_client.res
@%create $(OBJS)\client.lbc
@%append $(OBJS)\client.lbc option quiet
@%append $(OBJS)\client.lbc name $^@
@%append $(OBJS)\client.lbc option caseexact
- @%append $(OBJS)\client.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16'
+ @%append $(OBJS)\client.lbc $(LDFLAGS) $(__DEBUGINFO_3) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16'
@for %i in ($(CLIENT_OBJECTS)) do @%append $(OBJS)\client.lbc file %i
@for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\client.lbc library %i
@%append $(OBJS)\client.lbc option resource=$(OBJS)\client_client.res
@for %i in () do @%append $(OBJS)\client.lbc option stack=%i
wlink @$(OBJS)\client.lbc
+!endif
+!ifeq USE_GUI 1
$(OBJS)\server.exe : $(SERVER_OBJECTS) $(OBJS)\server_server.res
@%create $(OBJS)\server.lbc
@%append $(OBJS)\server.lbc option quiet
@%append $(OBJS)\server.lbc name $^@
@%append $(OBJS)\server.lbc option caseexact
- @%append $(OBJS)\server.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16'
+ @%append $(OBJS)\server.lbc $(LDFLAGS) $(__DEBUGINFO_3) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16'
@for %i in ($(SERVER_OBJECTS)) do @%append $(OBJS)\server.lbc file %i
@for %i in ( $(__WXLIB_CORE_p) $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\server.lbc library %i
@%append $(OBJS)\server.lbc option resource=$(OBJS)\server_server.res
@for %i in () do @%append $(OBJS)\server.lbc option stack=%i
wlink @$(OBJS)\server.lbc
+!endif
+
+$(OBJS)\baseclient.exe : $(BASECLIENT_OBJECTS)
+ @%create $(OBJS)\baseclient.lbc
+ @%append $(OBJS)\baseclient.lbc option quiet
+ @%append $(OBJS)\baseclient.lbc name $^@
+ @%append $(OBJS)\baseclient.lbc option caseexact
+ @%append $(OBJS)\baseclient.lbc $(LDFLAGS) $(__DEBUGINFO_3) libpath $(LIBDIRNAME) system nt ref 'main_'
+ @for %i in ($(BASECLIENT_OBJECTS)) do @%append $(OBJS)\baseclient.lbc file %i
+ @for %i in ( $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\baseclient.lbc library %i
+ @%append $(OBJS)\baseclient.lbc
+ @for %i in () do @%append $(OBJS)\baseclient.lbc option stack=%i
+ wlink @$(OBJS)\baseclient.lbc
+
+$(OBJS)\baseserver.exe : $(BASESERVER_OBJECTS)
+ @%create $(OBJS)\baseserver.lbc
+ @%append $(OBJS)\baseserver.lbc option quiet
+ @%append $(OBJS)\baseserver.lbc name $^@
+ @%append $(OBJS)\baseserver.lbc option caseexact
+ @%append $(OBJS)\baseserver.lbc $(LDFLAGS) $(__DEBUGINFO_3) libpath $(LIBDIRNAME) system nt ref 'main_'
+ @for %i in ($(BASESERVER_OBJECTS)) do @%append $(OBJS)\baseserver.lbc file %i
+ @for %i in ( $(__WXLIB_NET_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\baseserver.lbc library %i
+ @%append $(OBJS)\baseserver.lbc
+ @for %i in () do @%append $(OBJS)\baseserver.lbc option stack=%i
+ wlink @$(OBJS)\baseserver.lbc
$(OBJS)\client_client.obj : .AUTODEPEND .\client.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(CLIENT_CXXFLAGS) $<
$(OBJS)\server_server.res : .AUTODEPEND .\server.rc
wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=.\..\..\include -i=. $(__DLLFLAG_p) -i=.\..\..\samples -dNOPCH $<
+$(OBJS)\baseclient_baseclient.obj : .AUTODEPEND .\baseclient.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(BASECLIENT_CXXFLAGS) $<
+
+$(OBJS)\baseserver_baseserver.obj : .AUTODEPEND .\baseserver.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(BASESERVER_CXXFLAGS) $<
+
// --------------------------------------------------------------------------
// the application icon
-#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__)
-# include "mondrian.xpm"
-#endif
+#include "mondrian.xpm"
// --------------------------------------------------------------------------
// classes
<include file="../../build/bakefiles/common_samples.bkl"/>
- <exe id="client" template="wx_sample" template_append="wx_append">
+ <if cond="FORMAT=='gnu'">
+ <!-- as we can't (easily) test for GUI, build them always -->
+ <set var="cond_build_gui">1</set>
+ </if>
+ <if cond="FORMAT!='gnu'">
+ <set var="cond_build_gui">USE_GUI=='1'</set>
+ </if>
+
+ <exe id="client" template="wx_sample" template_append="wx_append" cond="$(cond_build_gui)">
<sources>client.cpp</sources>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<win32-res>client.rc</win32-res>
</exe>
- <exe id="server" template="wx_sample" template_append="wx_append">
+ <exe id="server" template="wx_sample" template_append="wx_append" cond="$(cond_build_gui)">
<sources>server.cpp</sources>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<win32-res>server.rc</win32-res>
</exe>
+ <exe id="baseclient" template="wx_sample_console"
+ template_append="wx_append_base">
+ <sources>baseclient.cpp</sources>
+ <wx-lib>net</wx-lib>
+ <wx-lib>base</wx-lib>
+ </exe>
+
+ <exe id="baseserver" template="wx_sample_console"
+ template_append="wx_append_base">
+ <sources>baseserver.cpp</sources>
+ <wx-lib>net</wx-lib>
+ <wx-lib>base</wx-lib>
+ </exe>
+
</makefile>
--- /dev/null
+# Microsoft Developer Studio Project File - Name="sockets_baseclient" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
+\r
+CFG=baseclient - Win32 Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "sockets_baseclient.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "sockets_baseclient.mak" CFG="baseclient - Win32 Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "baseclient - Win32 DLL Universal Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseclient - Win32 DLL Universal Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseclient - Win32 DLL Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseclient - Win32 DLL Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseclient - Win32 Universal Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseclient - Win32 Universal Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseclient - Win32 Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseclient - Win32 Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+RSC=rc.exe\r
+\r
+!IF "$(CFG)" == "baseclient - Win32 DLL Universal Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "vc_mswunivudll"\r
+# PROP BASE Intermediate_Dir "vc_mswunivudll\baseclient"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "vc_mswunivudll"\r
+# PROP Intermediate_Dir "vc_mswunivudll\baseclient"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MD /Fdvc_mswunivudll\baseclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MD /Fdvc_mswunivudll\baseclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivudll\baseclient.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivudll\baseclient.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseclient - Win32 DLL Universal Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswunivuddll"\r
+# PROP BASE Intermediate_Dir "vc_mswunivuddll\baseclient"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswunivuddll"\r
+# PROP Intermediate_Dir "vc_mswunivuddll\baseclient"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivuddll\baseclient.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivuddll\baseclient.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\baseclient.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\baseclient.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseclient - Win32 DLL Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "vc_mswudll"\r
+# PROP BASE Intermediate_Dir "vc_mswudll\baseclient"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "vc_mswudll"\r
+# PROP Intermediate_Dir "vc_mswudll\baseclient"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MD /Fdvc_mswudll\baseclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MD /Fdvc_mswudll\baseclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswudll\baseclient.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswudll\baseclient.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseclient - Win32 DLL Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswuddll"\r
+# PROP BASE Intermediate_Dir "vc_mswuddll\baseclient"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswuddll"\r
+# PROP Intermediate_Dir "vc_mswuddll\baseclient"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswuddll\baseclient.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_dll\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswuddll\baseclient.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_dll\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuddll\baseclient.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuddll\baseclient.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseclient - Win32 Universal Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "vc_mswunivu"\r
+# PROP BASE Intermediate_Dir "vc_mswunivu\baseclient"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "vc_mswunivu"\r
+# PROP Intermediate_Dir "vc_mswunivu\baseclient"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MD /Fdvc_mswunivu\baseclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MD /Fdvc_mswunivu\baseclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivu\baseclient.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivu\baseclient.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseclient - Win32 Universal Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswunivud"\r
+# PROP BASE Intermediate_Dir "vc_mswunivud\baseclient"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswunivud"\r
+# PROP Intermediate_Dir "vc_mswunivud\baseclient"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivud\baseclient.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivud\baseclient.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivud\baseclient.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivud\baseclient.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseclient - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "vc_mswu"\r
+# PROP BASE Intermediate_Dir "vc_mswu\baseclient"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "vc_mswu"\r
+# PROP Intermediate_Dir "vc_mswu\baseclient"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MD /Fdvc_mswu\baseclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MD /Fdvc_mswu\baseclient.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswu\baseclient.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswu\baseclient.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseclient - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswud"\r
+# PROP BASE Intermediate_Dir "vc_mswud\baseclient"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswud"\r
+# PROP Intermediate_Dir "vc_mswud\baseclient"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswud\baseclient.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_lib\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswud\baseclient.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_lib\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswud\baseclient.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswud\baseclient.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+\r
+!ENDIF\r
+\r
+# Begin Target\r
+\r
+# Name "baseclient - Win32 DLL Universal Release"\r
+# Name "baseclient - Win32 DLL Universal Debug"\r
+# Name "baseclient - Win32 DLL Release"\r
+# Name "baseclient - Win32 DLL Debug"\r
+# Name "baseclient - Win32 Universal Release"\r
+# Name "baseclient - Win32 Universal Debug"\r
+# Name "baseclient - Win32 Release"\r
+# Name "baseclient - Win32 Debug"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=.\baseclient.cpp\r
+# End Source File\r
+# End Group\r
+# End Target\r
+# End Project\r
+\r
--- /dev/null
+# Microsoft Developer Studio Project File - Name="sockets_baseserver" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
+\r
+CFG=baseserver - Win32 Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "sockets_baseserver.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "sockets_baseserver.mak" CFG="baseserver - Win32 Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "baseserver - Win32 DLL Universal Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseserver - Win32 DLL Universal Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseserver - Win32 DLL Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseserver - Win32 DLL Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseserver - Win32 Universal Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseserver - Win32 Universal Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseserver - Win32 Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "baseserver - Win32 Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+RSC=rc.exe\r
+\r
+!IF "$(CFG)" == "baseserver - Win32 DLL Universal Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "vc_mswunivudll"\r
+# PROP BASE Intermediate_Dir "vc_mswunivudll\baseserver"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "vc_mswunivudll"\r
+# PROP Intermediate_Dir "vc_mswunivudll\baseserver"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MD /Fdvc_mswunivudll\baseserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MD /Fdvc_mswunivudll\baseserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivudll\baseserver.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivudll\baseserver.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseserver - Win32 DLL Universal Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswunivuddll"\r
+# PROP BASE Intermediate_Dir "vc_mswunivuddll\baseserver"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswunivuddll"\r
+# PROP Intermediate_Dir "vc_mswunivuddll\baseserver"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivuddll\baseserver.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivuddll\baseserver.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\baseserver.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\baseserver.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseserver - Win32 DLL Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "vc_mswudll"\r
+# PROP BASE Intermediate_Dir "vc_mswudll\baseserver"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "vc_mswudll"\r
+# PROP Intermediate_Dir "vc_mswudll\baseserver"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MD /Fdvc_mswudll\baseserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MD /Fdvc_mswudll\baseserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswudll\baseserver.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswudll\baseserver.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseserver - Win32 DLL Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswuddll"\r
+# PROP BASE Intermediate_Dir "vc_mswuddll\baseserver"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswuddll"\r
+# PROP Intermediate_Dir "vc_mswuddll\baseserver"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswuddll\baseserver.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_dll\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswuddll\baseserver.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_dll\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuddll\baseserver.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuddll\baseserver.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseserver - Win32 Universal Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "vc_mswunivu"\r
+# PROP BASE Intermediate_Dir "vc_mswunivu\baseserver"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "vc_mswunivu"\r
+# PROP Intermediate_Dir "vc_mswunivu\baseserver"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MD /Fdvc_mswunivu\baseserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MD /Fdvc_mswunivu\baseserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivu\baseserver.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivu\baseserver.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseserver - Win32 Universal Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswunivud"\r
+# PROP BASE Intermediate_Dir "vc_mswunivud\baseserver"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswunivud"\r
+# PROP Intermediate_Dir "vc_mswunivud\baseserver"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivud\baseserver.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswunivud\baseserver.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivud\baseserver.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivud\baseserver.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseserver - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "vc_mswu"\r
+# PROP BASE Intermediate_Dir "vc_mswu\baseserver"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "vc_mswu"\r
+# PROP Intermediate_Dir "vc_mswu\baseserver"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MD /Fdvc_mswu\baseserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MD /Fdvc_mswu\baseserver.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswu\baseserver.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+# ADD LINK32 wxbase29u_net.lib wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswu\baseserver.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+\r
+!ELSEIF "$(CFG)" == "baseserver - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswud"\r
+# PROP BASE Intermediate_Dir "vc_mswud\baseserver"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswud"\r
+# PROP Intermediate_Dir "vc_mswud\baseserver"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswud\baseserver.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_lib\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Gm /GZ /Fdvc_mswud\baseserver.pdb /Od /GR /EHsc /I ".\..\..\lib\vc_lib\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswud\baseserver.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+# ADD LINK32 wxbase29ud_net.lib wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswud\baseserver.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+\r
+!ENDIF\r
+\r
+# Begin Target\r
+\r
+# Name "baseserver - Win32 DLL Universal Release"\r
+# Name "baseserver - Win32 DLL Universal Debug"\r
+# Name "baseserver - Win32 DLL Release"\r
+# Name "baseserver - Win32 DLL Debug"\r
+# Name "baseserver - Win32 Universal Release"\r
+# Name "baseserver - Win32 Universal Debug"\r
+# Name "baseserver - Win32 Release"\r
+# Name "baseserver - Win32 Debug"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=.\baseserver.cpp\r
+# End Source File\r
+# End Group\r
+# End Target\r
+# End Project\r
+\r
// nothing to do
}
-#if wxUSE_SOCKETS
-GSocketGUIFunctionsTable* wxConsoleAppTraitsBase::GetSocketGUIFunctionsTable()
-{
- return NULL;
-}
-#endif
-
// ----------------------------------------------------------------------------
// wxAppTraits
// ----------------------------------------------------------------------------
wxPendingDelete.DeleteObject(object);
}
-#if wxUSE_SOCKETS
-
-#if defined(__WINDOWS__)
- #include "wx/msw/gsockmsw.h"
-#elif defined(__UNIX__) || defined(__DARWIN__) || defined(__OS2__)
- #include "wx/unix/gsockunx.h"
-#elif defined(__WXMAC__)
- #include <MacHeaders.c>
- #define OTUNIXERRORS 1
- #include <OpenTransport.h>
- #include <OpenTransportProviders.h>
- #include <OpenTptInternet.h>
-
- #include "wx/mac/gsockmac.h"
-#else
- #error "Must include correct GSocket header here"
-#endif
-
-GSocketGUIFunctionsTable* wxGUIAppTraitsBase::GetSocketGUIFunctionsTable()
-{
- static GSocketGUIFunctionsTableConcrete table;
- return &table;
-}
-
-#endif
#endif // wxUSE_EPOLL_DISPATCHER
#if wxUSE_SELECT_DISPATCHER
gs_dispatcher = wxSelectDispatcher::Create();
-#endif // wxUSE_WCHAR_T
+#endif // wxUSE_SELECT_DISPATCHER
}
wxASSERT_MSG( gs_dispatcher, _T("failed to create any IO dispatchers") );
// Created: 08.24.06
// RCS-ID: $Id$
// Copyright: (c) 2006 Angel vidal
+// (c) 2007 Vadim Zeitlin <vadim@wxwidgets.org>
// License: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#if wxUSE_SOCKETS && wxUSE_SELECT_DISPATCHER
-#include "wx/private/gsocketiohandler.h"
+#include "wx/apptrait.h"
#include "wx/unix/private.h"
-#include "wx/gsocket.h"
-#include "wx/unix/gsockunx.h"
+#include "wx/private/gsocketiohandler.h"
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
-// wxGSocketIOHandler
+// GSocketSelectManager
// ----------------------------------------------------------------------------
-wxGSocketIOHandler::wxGSocketIOHandler(GSocket* socket)
- : m_socket(socket),
- m_flags(0)
+class GSocketSelectManager : public GSocketFDBasedManager
{
+public:
+ virtual void Install_Callback(GSocket *socket, GSocketEvent event);
+ virtual void Uninstall_Callback(GSocket *socket, GSocketEvent event);
+};
-}
-
-void wxGSocketIOHandler::OnReadWaiting()
+void GSocketSelectManager::Install_Callback(GSocket *socket,
+ GSocketEvent event)
{
- m_socket->Detected_Read();
-}
+ const int fd = socket->m_fd;
-void wxGSocketIOHandler::OnWriteWaiting()
-{
- m_socket->Detected_Write();
-}
+ if ( fd == -1 )
+ return;
-void wxGSocketIOHandler::OnExceptionWaiting()
-{
- m_socket->Detected_Read();
-}
+ const SocketDir d = GetDirForEvent(socket, event);
-int wxGSocketIOHandler::GetFlags() const
-{
- return m_flags;
-}
+ wxFDIODispatcher * const dispatcher = wxFDIODispatcher::Get();
+ if ( !dispatcher )
+ return;
+ wxGSocketIOHandler *& handler = socket->m_handler;
-void wxGSocketIOHandler::RemoveFlag(wxFDIODispatcherEntryFlags flag)
-{
- m_flags &= ~flag;
-}
+ // we should register the new handlers but modify the existing ones in place
+ bool registerHandler;
+ if ( handler )
+ {
+ registerHandler = false;
+ }
+ else // no existing handler
+ {
+ registerHandler = true;
+ handler = new wxGSocketIOHandler(socket);
+ }
-void wxGSocketIOHandler::AddFlag(wxFDIODispatcherEntryFlags flag)
-{
- m_flags |= flag;
-}
+ FD(socket, d) = fd;
+ if (d == FD_INPUT)
+ {
+ handler->AddFlag(wxFDIO_INPUT);
+ }
+ else
+ {
+ handler->AddFlag(wxFDIO_OUTPUT);
+ }
-// ----------------------------------------------------------------------------
-// GSocket interface
-// ----------------------------------------------------------------------------
-
-bool GSocketGUIFunctionsTableConcrete::CanUseEventLoop()
-{
- return true;
-}
-
-bool GSocketGUIFunctionsTableConcrete::OnInit()
-{
- return true;
-}
-
-void GSocketGUIFunctionsTableConcrete::OnExit()
-{
+ if ( registerHandler )
+ dispatcher->RegisterFD(fd, handler, handler->GetFlags());
+ else
+ dispatcher->ModifyFD(fd, handler, handler->GetFlags());
}
-bool GSocketGUIFunctionsTableConcrete::Init_Socket(GSocket *socket)
+void GSocketSelectManager::Uninstall_Callback(GSocket *socket,
+ GSocketEvent event)
{
- int *m_id;
+ const SocketDir d = GetDirForEvent(socket, event);
- socket->m_gui_dependent = (char *)malloc(sizeof(int)*2);
- m_id = (int *)(socket->m_gui_dependent);
+ const int fd = FD(socket, d);
+ if ( fd == -1 )
+ return;
- m_id[0] = -1;
- m_id[1] = -1;
+ FD(socket, d) = -1;
- return true;
-}
+ const wxFDIODispatcherEntryFlags
+ flag = d == FD_INPUT ? wxFDIO_INPUT : wxFDIO_OUTPUT;
-void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
-{
- free(socket->m_gui_dependent);
-}
+ wxFDIODispatcher * const dispatcher = wxFDIODispatcher::Get();
+ if ( !dispatcher )
+ return;
-void GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket *socket,
- GSocketEvent event)
-{
- int *m_id = (int *)(socket->m_gui_dependent);
- const int fd = socket->m_fd;
-
- if ( fd == -1 )
- return;
-
- int c;
- switch (event)
- {
- case GSOCK_LOST: /* fall-through */
- case GSOCK_INPUT: c = 0; break;
- case GSOCK_OUTPUT: c = 1; break;
- case GSOCK_CONNECTION: c = ((socket->m_server) ? 0 : 1); break;
- default: return;
- }
-
- wxFDIODispatcher * const dispatcher = wxFDIODispatcher::Get();
- if ( !dispatcher )
- return;
-
- wxGSocketIOHandler *& handler = socket->m_handler;
-
- // we should register the new handlers but modify the existing ones in place
- bool registerHandler;
- if ( handler )
- {
- registerHandler = false;
- }
- else // no existing handler
- {
- registerHandler = true;
- handler = new wxGSocketIOHandler(socket);
- }
-
- if (c == 0)
- {
- m_id[0] = fd;
- handler->AddFlag(wxFDIO_INPUT);
- }
- else
- {
- m_id[1] = fd;
- handler->AddFlag(wxFDIO_OUTPUT);
- }
-
- if ( registerHandler )
- dispatcher->RegisterFD(fd, handler, handler->GetFlags());
- else
- dispatcher->ModifyFD(fd, handler, handler->GetFlags());
-}
+ wxGSocketIOHandler *& handler = socket->m_handler;
+ if ( handler )
+ {
+ handler->RemoveFlag(flag);
-void GSocketGUIFunctionsTableConcrete::Uninstall_Callback(GSocket *socket,
- GSocketEvent event)
-{
- int *m_id = (int *)(socket->m_gui_dependent);
- int c;
-
- switch (event)
- {
- case GSOCK_LOST: /* fall-through */
- case GSOCK_INPUT: c = 0; break;
- case GSOCK_OUTPUT: c = 1; break;
- case GSOCK_CONNECTION: c = ((socket->m_server) ? 0 : 1); break;
- default: return;
- }
-
- if ( m_id[c] == -1 )
- return;
-
- int fd = m_id[c];
- m_id[c] = -1;
-
- const wxFDIODispatcherEntryFlags flag = c == 0 ? wxFDIO_INPUT : wxFDIO_OUTPUT;
-
- wxFDIODispatcher * const dispatcher = wxFDIODispatcher::Get();
- if ( !dispatcher )
- return;
-
- wxGSocketIOHandler *& handler = socket->m_handler;
- if ( handler )
- {
- handler->RemoveFlag(flag);
-
- if ( !handler->GetFlags() )
- {
- dispatcher->UnregisterFD(fd);
- delete handler;
- }
- else
- {
- dispatcher->ModifyFD(fd, handler, handler->GetFlags());
- }
- }
- else
- {
- dispatcher->UnregisterFD(fd);
- }
+ if ( !handler->GetFlags() )
+ {
+ dispatcher->UnregisterFD(fd);
+ delete handler;
+ socket->m_handler = NULL;
+ }
+ else
+ {
+ dispatcher->ModifyFD(fd, handler, handler->GetFlags());
+ }
+ }
+ else
+ {
+ dispatcher->UnregisterFD(fd);
+ }
}
-void GSocketGUIFunctionsTableConcrete::Enable_Events(GSocket *socket)
+GSocketManager *wxAppTraits::GetSocketManager()
{
- Install_Callback(socket, GSOCK_INPUT);
- Install_Callback(socket, GSOCK_OUTPUT);
-}
+ static GSocketSelectManager s_manager;
-void GSocketGUIFunctionsTableConcrete::Disable_Events(GSocket *socket)
-{
- Uninstall_Callback(socket, GSOCK_INPUT);
- Uninstall_Callback(socket, GSOCK_OUTPUT);
+ return &s_manager;
}
#endif // wxUSE_SOCKETS
if ( flags & ms_flags[n] )
{
wxFD_SET(fd, &m_fds[n]);
- wxLogTrace(wxSelectDispatcher_Trace,
- _T("Registered fd %d for %s events"), fd, ms_names[n]);
}
else if ( wxFD_ISSET(fd, (fd_set*) &m_fds[n]) )
{
wxFD_CLR(fd, &m_fds[n]);
- wxLogTrace(wxSelectDispatcher_Trace,
- _T("Unregistered fd %d from %s events"), fd, ms_names[n]);
}
}
wxLogTrace(wxSelectDispatcher_Trace,
_T("Got %s event on fd %d"), ms_names[n], fd);
(handler.*ms_handlers[n])();
+ // callback can modify sets and destroy handler
+ // this forces that one event can be processed at one time
+ return;
}
}
}
if ( fd > m_maxFD )
m_maxFD = fd;
+ wxLogTrace(wxSelectDispatcher_Trace,
+ _T("Registered fd %d: input:%d, output:%d, exceptional:%d"), fd, (flags & wxFDIO_INPUT) == wxFDIO_INPUT, (flags & wxFDIO_OUTPUT), (flags & wxFDIO_EXCEPTION) == wxFDIO_EXCEPTION);
return true;
}
wxASSERT_MSG( fd <= m_maxFD, _T("logic error: registered fd > m_maxFD?") );
+ wxLogTrace(wxSelectDispatcher_Trace,
+ _T("Modified fd %d: input:%d, output:%d, exceptional:%d"), fd, (flags & wxFDIO_INPUT) == wxFDIO_INPUT, (flags & wxFDIO_OUTPUT) == wxFDIO_OUTPUT, (flags & wxFDIO_EXCEPTION) == wxFDIO_EXCEPTION);
return m_sets.SetFD(fd, flags);
}
++it )
{
if ( it->first > m_maxFD )
+ {
m_maxFD = it->first;
+ }
}
}
}
+ wxLogTrace(wxSelectDispatcher_Trace,
+ _T("Removed fd %d, current max: %d"), fd, m_maxFD);
return true;
}
#include "wx/sckaddr.h"
#include "wx/stopwatch.h"
#include "wx/thread.h"
+#include "wx/evtloop.h"
// DLL options compatibility check:
#include "wx/build.h"
DECLARE_NO_COPY_CLASS(wxSocketState)
};
+// ============================================================================
+// GSocketManager
+// ============================================================================
+
+GSocketManager *GSocketManager::ms_manager = NULL;
+
+/* static */
+void GSocketManager::Set(GSocketManager *manager)
+{
+ wxASSERT_MSG( !ms_manager, "too late to set manager now" );
+
+ ms_manager = manager;
+}
+
+/* static */
+void GSocketManager::Init()
+{
+ wxASSERT_MSG( !ms_manager, "shouldn't be initialized twice" );
+
+ /*
+ Details: Initialize() creates a hidden window as a sink for socket
+ events, such as 'read completed'. wxMSW has only one message loop
+ for the main thread. If Initialize is called in a secondary thread,
+ the socket window will be created for the secondary thread, but
+ since there is no message loop on this thread, it will never
+ receive events and all socket operations will time out.
+ BTW, the main thread must not be stopped using sleep or block
+ on a semaphore (a bad idea in any case) or socket operations
+ will time out.
+
+ On the Mac side, Initialize() stores a pointer to the CFRunLoop for
+ the main thread. Because secondary threads do not have run loops,
+ adding event notifications to the "Current" loop would have no
+ effect at all, events would never fire.
+ */
+ wxASSERT_MSG( wxIsMainThread(),
+ "sockets must be initialized from the main thread" );
+
+ wxAppConsole * const app = wxAppConsole::GetInstance();
+ wxCHECK_RET( app, "sockets can't be initialized without wxApp" );
+
+ ms_manager = app->GetTraits()->GetSocketManager();
+}
+
// ==========================================================================
// wxSocketBase
// ==========================================================================
{
if ( !m_countInit++ )
{
- /*
- Details: Initialize() creates a hidden window as a sink for socket
- events, such as 'read completed'. wxMSW has only one message loop
- for the main thread. If Initialize is called in a secondary thread,
- the socket window will be created for the secondary thread, but
- since there is no message loop on this thread, it will never
- receive events and all socket operations will time out.
- BTW, the main thread must not be stopped using sleep or block
- on a semaphore (a bad idea in any case) or socket operations
- will time out.
-
- On the Mac side, Initialize() stores a pointer to the CFRunLoop for
- the main thread. Because secondary threads do not have run loops,
- adding event notifications to the "Current" loop would have no
- effect at all, events would never fire.
- */
- wxASSERT_MSG( wxIsMainThread(),
- wxT("Call wxSocketBase::Initialize() from the main thread first!"));
-
- wxAppTraits *traits = wxAppConsole::GetInstance() ?
- wxAppConsole::GetInstance()->GetTraits() : NULL;
- GSocketGUIFunctionsTable *functions =
- traits ? traits->GetSocketGUIFunctionsTable() : NULL;
- GSocket_SetGUIFunctions(functions);
-
if ( !GSocket_Init() )
{
m_countInit--;
void wxSocketBase::Shutdown()
{
// we should be initialized
- wxASSERT_MSG( m_countInit, _T("extra call to Shutdown()") );
+ wxASSERT_MSG( m_countInit > 0, _T("extra call to Shutdown()") );
if ( --m_countInit == 0 )
{
GSocket_Cleanup();
else
timeout = m_timeout * 1000;
- bool has_event_loop = wxTheApp->GetTraits() ? (wxTheApp->GetTraits()->GetSocketGUIFunctionsTable() ? true : false) : false;
+ // check if we are using event loop or not: normally we do in GUI but not in
+ // console applications but this can be overridden
+ const bool has_event_loop = wxEventLoop::GetActive() != NULL;
// Wait in an active polling loop.
//
void wxSocketBase::Notify(bool notify)
{
m_notify = notify;
+ if (m_socket)
+ m_socket->Notify(notify);
}
void wxSocketBase::SetNotify(wxSocketEventFlags flags)
return;
}
- // Setup the socket as server
-
+ // Setup the socket as server
+ m_socket->Notify(m_notify);
m_socket->SetLocal(addr_man.GetAddress());
if (GetFlags() & wxSOCKET_REUSEADDR) {
m_socket->SetCallback(GSOCK_INPUT_FLAG | GSOCK_OUTPUT_FLAG |
GSOCK_LOST_FLAG | GSOCK_CONNECTION_FLAG,
wx_socket_callback, (char *)this);
+
+ wxLogTrace( wxTRACE_Socket, _T("wxSocketServer on fd %d"), m_socket->m_fd );
}
// --------------------------------------------------------------------------
m_socket->SetPeer(addr_man.GetAddress());
err = m_socket->Connect(GSOCK_STREAMED);
+ //this will register for callbacks - must be called after m_socket->m_fd was initialized
+ m_socket->Notify(m_notify);
+
if (!wait)
m_socket->SetNonBlocking(0);
wxFAIL_MSG( _T("datagram socket not new'd") );
return;
}
+ m_socket->Notify(m_notify);
// Setup the socket as non connection oriented
m_socket->SetLocal(addr.GetAddress());
if (flags & wxSOCKET_REUSEADDR)
-/* -------------------------------------------------------------------------
- * Project: GSocket (Generic Socket) for WX
- * Name: src/gtk/gsockgtk.cpp
- * Purpose: GSocket: GTK part
- * Licence: The wxWindows licence
- * CVSID: $Id$
- * -------------------------------------------------------------------------
- */
+///////////////////////////////////////////////////////////////////////////////
+// Name: gtk/gsockgtk.cpp
+// Purpose: implementation of wxGTK-specific socket event handling
+// Author: Guilhem Lavaux, Vadim Zeitlin
+// Created: 1999
+// RCS-ID: $Id$
+// Copyright: (c) 1999, 2007 wxWidgets dev team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if wxUSE_SOCKETS
-#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <glib.h>
#include "wx/gsocket.h"
-#include "wx/unix/gsockunx.h"
-
+#include "wx/apptrait.h"
extern "C" {
static
}
}
-bool GSocketGUIFunctionsTableConcrete::CanUseEventLoop()
-{ return true; }
-
-bool GSocketGUIFunctionsTableConcrete::OnInit(void)
-{
- return 1;
-}
-
-void GSocketGUIFunctionsTableConcrete::OnExit(void)
-{
-}
-
-bool GSocketGUIFunctionsTableConcrete::Init_Socket(GSocket *socket)
+class GTKSocketManager : public GSocketInputBasedManager
{
- gint *m_id;
-
- socket->m_gui_dependent = (char *)malloc(sizeof(gint)*2);
- m_id = (gint *)(socket->m_gui_dependent);
-
- m_id[0] = -1;
- m_id[1] = -1;
-
- return TRUE;
-}
-
-void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
-{
- free(socket->m_gui_dependent);
-}
-
-void GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket *socket, GSocketEvent event)
-{
- gint *m_id = (gint *)(socket->m_gui_dependent);
- int c;
-
- if (socket->m_fd == -1)
- return;
-
- switch (event)
- {
- case GSOCK_LOST: /* fall-through */
- case GSOCK_INPUT: c = 0; break;
- case GSOCK_OUTPUT: c = 1; break;
- case GSOCK_CONNECTION: c = ((socket->m_server) ? 0 : 1); break;
- default: return;
- }
-
- if (m_id[c] != -1)
- gdk_input_remove(m_id[c]);
-
- m_id[c] = gdk_input_add(socket->m_fd,
- (c ? GDK_INPUT_WRITE : GDK_INPUT_READ),
- _GSocket_GDK_Input,
- (gpointer)socket);
-}
-
-void GSocketGUIFunctionsTableConcrete::Uninstall_Callback(GSocket *socket, GSocketEvent event)
-{
- gint *m_id = (gint *)(socket->m_gui_dependent);
- int c;
-
- assert( m_id != NULL );
-
- switch (event)
- {
- case GSOCK_LOST: /* fall-through */
- case GSOCK_INPUT: c = 0; break;
- case GSOCK_OUTPUT: c = 1; break;
- case GSOCK_CONNECTION: c = ((socket->m_server) ? 0 : 1); break;
- default: return;
- }
-
- if (m_id[c] != -1)
- {
- gdk_input_remove(m_id[c]);
- m_id[c] = -1;
- }
-}
-
-void GSocketGUIFunctionsTableConcrete::Enable_Events(GSocket *socket)
-{
- Install_Callback(socket, GSOCK_INPUT);
- Install_Callback(socket, GSOCK_OUTPUT);
-}
-
-void GSocketGUIFunctionsTableConcrete::Disable_Events(GSocket *socket)
+public:
+ virtual int AddInput(GSocket *socket, SocketDir d)
+ {
+ return gdk_input_add
+ (
+ socket->m_fd,
+ d == FD_OUTPUT ? GDK_INPUT_WRITE : GDK_INPUT_READ,
+ _GSocket_GDK_Input,
+ socket
+ );
+ }
+
+ virtual void RemoveInput(int fd)
+ {
+ gdk_input_remove(fd);
+ }
+};
+
+GSocketManager *wxGUIAppTraits::GetSocketManager()
{
- Uninstall_Callback(socket, GSOCK_INPUT);
- Uninstall_Callback(socket, GSOCK_OUTPUT);
+ static GTKSocketManager s_manager;
+ return &s_manager;
}
#endif // wxUSE_SOCKETS
-/* -------------------------------------------------------------------------
- * Project: GSocket (Generic Socket) for WX
- * Name: src/gtk1/gsockgtk.cpp
- * Purpose: GSocket: GTK part
- * Licence: The wxWindows licence
- * CVSID: $Id$
- * -------------------------------------------------------------------------
- */
+///////////////////////////////////////////////////////////////////////////////
+// Name: gtk/gsockgtk.cpp
+// Purpose: implementation of wxGTK-specific socket event handling
+// Author: Guilhem Lavaux, Vadim Zeitlin
+// Created: 1999
+// RCS-ID: $Id$
+// Copyright: (c) 1999, 2007 wxWidgets dev team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if wxUSE_SOCKETS
-#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <glib.h>
#include "wx/gsocket.h"
-#include "wx/unix/gsockunx.h"
-
+#include "wx/apptrait.h"
extern "C" {
static
}
}
-bool GSocketGUIFunctionsTableConcrete::CanUseEventLoop()
-{ return true; }
-
-bool GSocketGUIFunctionsTableConcrete::OnInit(void)
-{
- return 1;
-}
-
-void GSocketGUIFunctionsTableConcrete::OnExit(void)
-{
-}
-
-bool GSocketGUIFunctionsTableConcrete::Init_Socket(GSocket *socket)
+class GTKSocketManager : public GSocketInputBasedManager
{
- gint *m_id;
-
- socket->m_gui_dependent = (char *)malloc(sizeof(gint)*2);
- m_id = (gint *)(socket->m_gui_dependent);
-
- m_id[0] = -1;
- m_id[1] = -1;
-
- return TRUE;
-}
-
-void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
+public:
+ virtual int AddInput(GSocket *socket, SocketDir d)
+ {
+ return gdk_input_add
+ (
+ socket->m_fd,
+ d == FD_OUTPUT ? GDK_INPUT_WRITE : GDK_INPUT_READ,
+ _GSocket_GDK_Input,
+ socket
+ );
+ }
+
+ virtual void RemoveInput(int fd)
+ {
+ gdk_input_remove(fd);
+ }
+};
+
+GSocketManager *wxGUIAppTraits::GetSocketManager()
{
- free(socket->m_gui_dependent);
+ static GTKSocketManager s_manager;
+ return &s_manager;
}
-void GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket *socket, GSocketEvent event)
-{
- gint *m_id = (gint *)(socket->m_gui_dependent);
- int c;
-
- if (socket->m_fd == -1)
- return;
-
- switch (event)
- {
- case GSOCK_LOST: /* fall-through */
- case GSOCK_INPUT: c = 0; break;
- case GSOCK_OUTPUT: c = 1; break;
- case GSOCK_CONNECTION: c = ((socket->m_server) ? 0 : 1); break;
- default: return;
- }
-
- if (m_id[c] != -1)
- gdk_input_remove(m_id[c]);
-
- m_id[c] = gdk_input_add(socket->m_fd,
- (c ? GDK_INPUT_WRITE : GDK_INPUT_READ),
- _GSocket_GDK_Input,
- (gpointer)socket);
-}
-
-void GSocketGUIFunctionsTableConcrete::Uninstall_Callback(GSocket *socket, GSocketEvent event)
-{
- gint *m_id = (gint *)(socket->m_gui_dependent);
- int c;
-
- assert( m_id != NULL );
-
- switch (event)
- {
- case GSOCK_LOST: /* fall-through */
- case GSOCK_INPUT: c = 0; break;
- case GSOCK_OUTPUT: c = 1; break;
- case GSOCK_CONNECTION: c = ((socket->m_server) ? 0 : 1); break;
- default: return;
- }
-
- if (m_id[c] != -1)
- {
- gdk_input_remove(m_id[c]);
- m_id[c] = -1;
- }
-}
-
-void GSocketGUIFunctionsTableConcrete::Enable_Events(GSocket *socket)
-{
- Install_Callback(socket, GSOCK_INPUT);
- Install_Callback(socket, GSOCK_OUTPUT);
-}
-
-void GSocketGUIFunctionsTableConcrete::Disable_Events(GSocket *socket)
-{
- Uninstall_Callback(socket, GSOCK_INPUT);
- Uninstall_Callback(socket, GSOCK_OUTPUT);
-}
-
-#else /* !wxUSE_SOCKETS */
-
-/* some compilers don't like having empty source files */
-static int wxDummyGsockVar = 0;
-
-#endif /* wxUSE_SOCKETS/!wxUSE_SOCKETS */
+#endif // wxUSE_SOCKETS
*/
}
-/* Global initialisers */
-
-void GSocket_SetGUIFunctions(GSocketGUIFunctionsTable *table)
-{
- // do nothing, wxMac doesn't have wxBase-GUI separation yet
-}
-
-int GSocket_Init()
+bool GSocket_Init()
{
- return 1;
+ return true;
}
-bool GSocket_Verify_Inited() ;
bool GSocket_Verify_Inited()
{
OSStatus err ;
#if wxUSE_SOCKETS
-#include <stdlib.h>
#include "wx/gsocket.h"
-#include "wx/unix/gsockunx.h"
+#include "wx/apptrait.h"
#include <CoreFoundation/CoreFoundation.h>
-#define ALL_CALLBACK_TYPES (kCFSocketReadCallBack | kCFSocketWriteCallBack | kCFSocketConnectCallBack)
+// ----------------------------------------------------------------------------
+// Mac-specific data associated with each socket by GSocketCFManager
+// ----------------------------------------------------------------------------
-struct MacGSocketData
+class MacGSocketData
{
- CFSocketRef socket;
- CFRunLoopSourceRef source;
+public:
+ // default ctor creates the object in uninitialized state, use Initialize()
+ // later to make it usable
+ MacGSocketData()
+ {
+ m_socket = NULL;
+ m_source = NULL;
+ }
+
+ // initialize the data associated with the given socket
+ bool Initialize(GSocket *socket)
+ {
+ wxASSERT_MSG( !IsInitialized(), "shouldn't be called twice" );
+
+ // we need a valid Unix socket to create a CFSocket
+ if ( socket->m_fd < 0 )
+ return false;
+
+ CFSocketContext cont;
+ cont.version = 0; // this currently must be 0
+ cont.info = socket; // pointer passed to our callback
+ cont.retain = NULL; // no need to retain/release/copy the
+ cont.release = NULL; // socket pointer, so all callbacks
+ cont.copyDescription = NULL; // can be left NULL
+
+ m_socket = CFSocketCreateWithNative
+ (
+ NULL, // default allocator
+ socket->m_fd,
+ kCFSocketReadCallBack |
+ kCFSocketWriteCallBack |
+ kCFSocketConnectCallBack,
+ SocketCallback,
+ &cont
+ );
+ if ( !m_socket )
+ return false;
+
+ m_source = CFSocketCreateRunLoopSource(NULL, m_socket, 0);
+
+ return m_source != NULL;
+ }
+
+ // free the objects created by Initialize()
+ ~MacGSocketData()
+ {
+ if ( m_source )
+ CFRelease(m_source);
+ if ( m_socket )
+ CFRelease(m_socket);
+ }
+
+ // return true if Initialize() had already been called successfully
+ bool IsInitialized() const { return m_source && m_socket; }
+
+
+ // accessors: should only be called if IsInitialized()
+ CFSocketRef GetSocket() const
+ {
+ wxASSERT( IsInitialized() );
+
+ return m_socket;
+ }
+
+ CFRunLoopSourceRef GetSource() const
+ {
+ wxASSERT( IsInitialized() );
+
+ return m_source;
+ }
+
+private:
+ static void SocketCallback(CFSocketRef WXUNUSED(s),
+ CFSocketCallBackType callbackType,
+ CFDataRef WXUNUSED(address),
+ const void* data,
+ void* info)
+ {
+ GSocket * const socket = wx_static_cast(GSocket *, info);
+ MacGSocketData * const
+ macdata = wx_static_cast(MacGSocketData *, socket->m_gui_dependent);
+ if ( !macdata )
+ return;
+
+ switch (callbackType)
+ {
+ case kCFSocketConnectCallBack:
+ wxASSERT(!socket->m_server);
+ // KH: If data is non-NULL, the connect failed, do not call Detected_Write,
+ // which will only end up creating a spurious connect event because the
+ // call to getsocketopt SO_ERROR inexplicably returns no error.
+ // The change in behavior cannot be traced to any particular commit or
+ // timeframe so I'm not sure what to think, but after so many hours,
+ // this seems to address the issue and it's time to move on.
+ if (data == NULL)
+ socket->Detected_Write();
+ break;
+
+ case kCFSocketReadCallBack:
+ socket->Detected_Read();
+ break;
+
+ case kCFSocketWriteCallBack:
+ socket->Detected_Write();
+ break;
+
+ default:
+ wxFAIL_MSG( "unexpected socket callback" );
+ }
+ }
+
+ CFSocketRef m_socket;
+ CFRunLoopSourceRef m_source;
+
+ DECLARE_NO_COPY_CLASS(MacGSocketData);
};
-// Sockets must use the event loop on the main thread
-// We will store the main loop's reference when Initialize is called
-static CFRunLoopRef s_mainRunLoop = NULL;
+// ----------------------------------------------------------------------------
+// CoreFoundation implementation of GSocketManager
+// ----------------------------------------------------------------------------
-void Mac_Socket_Callback(CFSocketRef WXUNUSED(s), CFSocketCallBackType callbackType,
- CFDataRef WXUNUSED(address), const void* data, void* info)
+class GSocketCFManager : public GSocketManager
{
- GSocket* socket = (GSocket*)info;
- struct MacGSocketData* macdata;
- macdata = (struct MacGSocketData*)socket->m_gui_dependent;
- if (!macdata) return;
- switch (callbackType)
- {
- case kCFSocketConnectCallBack:
- assert(!socket->m_server);
- // KH: If data is non-NULL, the connect failed, do not call Detected_Write,
- // which will only end up creating a spurious connect event because the
- // call to getsocketopt SO_ERROR inexplicably returns no error.
- // The change in behavior cannot be traced to any particular commit or
- // timeframe so I'm not sure what to think, but after so many hours,
- // this seems to address the issue and it's time to move on.
- if (data == NULL)
- socket->Detected_Write();
- break;
- case kCFSocketReadCallBack:
- socket->Detected_Read();
- break;
- case kCFSocketWriteCallBack:
- socket->Detected_Write();
- break;
- default:
- break; /* We shouldn't get here. */
- }
-}
+public:
+ virtual bool OnInit();
+ virtual void OnExit();
-struct MacGSocketData* _GSocket_Get_Mac_Socket(GSocket *socket)
-{
- /* If socket is already created, returns a pointer to the data */
- /* Otherwise, creates socket and returns the pointer */
- CFSocketContext cont;
- struct MacGSocketData* data = (struct MacGSocketData*)socket->m_gui_dependent;
-
- if (data && data->source) return data;
-
- /* CFSocket has not been created, create it: */
- if (socket->m_fd < 0 || !data) return NULL;
- cont.version = 0; cont.retain = NULL;
- cont.release = NULL; cont.copyDescription = NULL;
- cont.info = socket;
-
- CFSocketRef cf = CFSocketCreateWithNative(NULL, socket->m_fd,
- ALL_CALLBACK_TYPES, Mac_Socket_Callback, &cont);
- CFRunLoopSourceRef source = CFSocketCreateRunLoopSource(NULL, cf, 0);
- assert(source);
- socket->m_gui_dependent = (char*)data;
-
- /* Keep the source and the socket around. */
- data->source = source;
- data->socket = cf;
-
- return data;
-}
+ virtual bool Init_Socket(GSocket *socket);
+ virtual void Destroy_Socket(GSocket *socket);
+
+ virtual void Install_Callback(GSocket *socket, GSocketEvent event);
+ virtual void Uninstall_Callback(GSocket *socket, GSocketEvent event);
+
+ virtual void Enable_Events(GSocket *socket);
+ virtual void Disable_Events(GSocket *socket);
-bool GSocketGUIFunctionsTableConcrete::CanUseEventLoop()
-{ return true; }
+private:
+ // retrieve our custom data associated with the given socket
+ //
+ // this is a low level function, use GetInitializedData() instead if the
+ // data pointer should also be correctly initialized if it hadn't been done
+ // yet
+ //
+ // may return NULL if we hadn't created the data for this socket yet
+ MacGSocketData *GetData(GSocket *socket) const
+ {
+ return wx_static_cast(MacGSocketData *, socket->m_gui_dependent);
+ }
+
+ // return the custom data pointer initializing it if it hadn't been done
+ // yet
+ //
+ // may return NULL if there is no associated data
+ MacGSocketData *GetInitializedData(GSocket *socket) const
+ {
+ MacGSocketData * const data = GetData(socket);
+ if ( data && !data->IsInitialized() )
+ {
+ if ( !data->Initialize(socket) )
+ return NULL;
+ }
+
+ return data;
+ }
-bool GSocketGUIFunctionsTableConcrete::OnInit(void)
+ // return CFSocket callback mask corresponding to the given event (the
+ // socket parameter is needed because some events are interpreted
+ // differently depending on whether they happen on a server or on a client
+ // socket)
+ static int GetCFCallback(GSocket *socket, GSocketEvent event);
+
+
+ // Sockets must use the event loop on the main thread so we store a
+ // reference to the main loop here in OnInit()
+ static CFRunLoopRef ms_mainRunLoop;
+};
+
+CFRunLoopRef GSocketCFManager::ms_mainRunLoop = NULL;
+
+bool GSocketCFManager::OnInit()
{
// No need to store the main loop again
- if (s_mainRunLoop != NULL)
+ if (ms_mainRunLoop != NULL)
return true;
// Get the loop for the main thread so our events will actually fire.
// The common socket.cpp code will assert if initialize is called from a
// secondary thread, otherwise Mac would have the same problems as MSW
- s_mainRunLoop = CFRunLoopGetCurrent();
- CFRetain(s_mainRunLoop);
+ ms_mainRunLoop = CFRunLoopGetCurrent();
+ if ( !ms_mainRunLoop )
+ return false;
+
+ CFRetain(ms_mainRunLoop);
return true;
}
-void GSocketGUIFunctionsTableConcrete::OnExit(void)
+void GSocketCFManager::OnExit()
{
// Release the reference count, and set the reference back to NULL
- CFRelease(s_mainRunLoop);
- s_mainRunLoop = NULL;
+ CFRelease(ms_mainRunLoop);
+ ms_mainRunLoop = NULL;
}
-bool GSocketGUIFunctionsTableConcrete::Init_Socket(GSocket *socket)
+bool GSocketCFManager::Init_Socket(GSocket *socket)
{
- struct MacGSocketData *data = (struct MacGSocketData *)malloc(sizeof(struct MacGSocketData));
- if (data)
- {
- socket->m_gui_dependent = (char*)data;
- data->socket = NULL;
- data->source = NULL;
- return 1;
- }
- return 0;
+ socket->m_gui_dependent = new MacGSocketData;
+ return true;
}
-void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
+void GSocketCFManager::Destroy_Socket(GSocket *socket)
{
- struct MacGSocketData *data = (struct MacGSocketData*)(socket->m_gui_dependent);
- if (data)
+ MacGSocketData * const data = GetData(socket);
+ if ( data )
{
- if ( data->source )
- CFRelease(data->source);
- if ( data->socket )
- CFRelease(data->socket);
- free(data);
+ delete data;
+ socket->m_gui_dependent = NULL;
}
}
-void GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket *socket, GSocketEvent event)
+/* static */
+int GSocketCFManager::GetCFCallback(GSocket *socket, GSocketEvent event)
{
- int c;
- struct MacGSocketData* data = _GSocket_Get_Mac_Socket(socket);
- if (!data) return;
- switch (event)
+ switch ( event )
{
- case GSOCK_CONNECTION:
- if(socket->m_server)
- c = kCFSocketReadCallBack;
- else
- c = kCFSocketConnectCallBack;
- break;
- case GSOCK_LOST:
- case GSOCK_INPUT:
- c = kCFSocketReadCallBack;
- break;
- case GSOCK_OUTPUT:
- c = kCFSocketWriteCallBack;
- break;
- default:
- c = 0;
+ case GSOCK_CONNECTION:
+ return socket->m_server ? kCFSocketReadCallBack
+ : kCFSocketConnectCallBack;
+
+ case GSOCK_LOST:
+ case GSOCK_INPUT:
+ return kCFSocketReadCallBack;
+
+ case GSOCK_OUTPUT:
+ return kCFSocketWriteCallBack;
+
+ case GSOCK_MAX_EVENT:
+ wxFAIL_MSG( "invalid GSocketEvent" );
+ return 0;
+
+ default:
+ wxFAIL_MSG( "unknown GSocketEvent" );
+ return 0;
}
- CFSocketEnableCallBacks(data->socket, c);
}
-void GSocketGUIFunctionsTableConcrete::Uninstall_Callback(GSocket *socket, GSocketEvent event)
+void GSocketCFManager::Install_Callback(GSocket *socket, GSocketEvent event)
{
- int c;
- struct MacGSocketData* data = _GSocket_Get_Mac_Socket(socket);
- if (!data) return;
- switch (event)
- {
- case GSOCK_CONNECTION:
- if(socket->m_server)
- c = kCFSocketReadCallBack;
- else
- c = kCFSocketConnectCallBack;
- break;
- case GSOCK_LOST:
- case GSOCK_INPUT:
- c = kCFSocketReadCallBack;
- break;
- case GSOCK_OUTPUT:
- c = kCFSocketWriteCallBack;
- break;
- default:
- c = 0;
- }
- CFSocketDisableCallBacks(data->socket, c);
+ const MacGSocketData * const data = GetInitializedData(socket);
+ if ( !data )
+ return;
+
+ CFSocketEnableCallBacks(data->GetSocket(), GetCFCallback(socket, event));
}
-void GSocketGUIFunctionsTableConcrete::Enable_Events(GSocket *socket)
+void GSocketCFManager::Uninstall_Callback(GSocket *socket, GSocketEvent event)
{
- struct MacGSocketData* data = _GSocket_Get_Mac_Socket(socket);
- if (!data) return;
+ const MacGSocketData * const data = GetInitializedData(socket);
+ if ( !data )
+ return;
- CFRunLoopAddSource(s_mainRunLoop, data->source, kCFRunLoopCommonModes);
+ CFSocketDisableCallBacks(data->GetSocket(), GetCFCallback(socket, event));
}
-void GSocketGUIFunctionsTableConcrete::Disable_Events(GSocket *socket)
+void GSocketCFManager::Enable_Events(GSocket *socket)
{
- struct MacGSocketData* data = _GSocket_Get_Mac_Socket(socket);
- if (!data) return;
+ const MacGSocketData * const data = GetInitializedData(socket);
+ if ( !data )
+ return;
- /* CFSocketInvalidate does CFRunLoopRemoveSource anyway */
- CFRunLoopRemoveSource(s_mainRunLoop, data->source, kCFRunLoopCommonModes);
- CFSocketInvalidate(data->socket);
+ CFRunLoopAddSource(ms_mainRunLoop, data->GetSource(), kCFRunLoopCommonModes);
+}
+
+void GSocketCFManager::Disable_Events(GSocket *socket)
+{
+ const MacGSocketData * const data = GetInitializedData(socket);
+ if ( !data )
+ return;
+
+ // CFSocketInvalidate does CFRunLoopRemoveSource anyway
+ CFRunLoopRemoveSource(ms_mainRunLoop, data->GetSource(), kCFRunLoopCommonModes);
+ CFSocketInvalidate(data->GetSocket());
// CFSocketInvalidate has closed the socket so we want to make sure GSocket knows this
- socket->m_fd = -1 /*INVALID_SOCKET*/;
+ socket->m_fd = -1;
}
+GSocketManager *wxAppTraits::GetSocketManager()
+{
+ static GSocketCFManager s_manager;
+
+ return &s_manager;
+};
+
#endif // wxUSE_SOCKETS
-/////////////////////////////////////////////////////////////////////////////
-// Name: src/motif/gsockmot.cpp
-// Project: GSocket (Generic Socket) for WX
-// Purpose: GSocket: Motif part
-// CVSID: $Id$
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+// Name: motif/gsockmot.cpp
+// Purpose: implementation of wxMotif-specific socket event handling
+// Author: Guilhem Lavaux, Vadim Zeitlin
+// Created: 1999
+// RCS-ID: $Id$
+// Copyright: (c) 1999, 2007 wxWidgets dev team
+// Licence: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if wxUSE_SOCKETS
-#include <stdlib.h>
-#include <X11/Intrinsic.h>
+#include <X11/Intrinsic.h> // XtAppAdd/RemoveInput()
+#include "wx/motif/private.h" // wxGetAppContext()
#include "wx/gsocket.h"
-#include "wx/unix/gsockunx.h"
+#include "wx/apptrait.h"
-extern "C" XtAppContext wxGetAppContext();
+extern "C" {
static void _GSocket_Motif_Input(XtPointer data, int *WXUNUSED(fid),
XtInputId *WXUNUSED(id))
socket->Detected_Write();
}
-bool GSocketGUIFunctionsTableConcrete::CanUseEventLoop()
-{
- return true;
-}
-
-bool GSocketGUIFunctionsTableConcrete::OnInit(void)
-{
- return 1;
-}
-
-void GSocketGUIFunctionsTableConcrete::OnExit(void)
-{
-}
-
-bool GSocketGUIFunctionsTableConcrete::Init_Socket(GSocket *socket)
-{
- int *m_id;
-
- socket->m_gui_dependent = (char *)malloc(sizeof(int)*2);
- m_id = (int *)(socket->m_gui_dependent);
-
- m_id[0] = -1;
- m_id[1] = -1;
-
- return true;
}
-void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
+class MotifSocketManager : public GSocketInputBasedManager
{
- free(socket->m_gui_dependent);
-}
-
-void GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket *socket, GSocketEvent event)
-{
- int *m_id = (int *)(socket->m_gui_dependent);
- int c;
-
- if (socket->m_fd == -1)
- return;
-
- switch (event)
+public:
+ virtual int AddInput(GSocket *socket, SocketDir d)
{
- case GSOCK_LOST: /* fall-through */
- case GSOCK_INPUT: c = 0; break;
- case GSOCK_OUTPUT: c = 1; break;
- case GSOCK_CONNECTION: c = ((socket->m_server) ? 0 : 1); break;
- default: return;
+ return XtAppAddInput
+ (
+ wxGetAppContext(),
+ socket->m_fd,
+ (XtPointer)(d == FD_OUTPUT ? XtInputWriteMask
+ : XtInputReadMask),
+ d == FD_OUTPUT ? _GSocket_Motif_Output
+ : _GSocket_Motif_Input,
+ socket
+ );
}
- if (m_id[c] != -1)
- XtRemoveInput(m_id[c]);
-
- if (c == 0)
- {
- m_id[0] = XtAppAddInput(wxGetAppContext(), socket->m_fd,
- (XtPointer *)XtInputReadMask,
- (XtInputCallbackProc) _GSocket_Motif_Input,
- (XtPointer) socket);
- }
- else
+ virtual void RemoveInput(int fd)
{
- m_id[1] = XtAppAddInput(wxGetAppContext(), socket->m_fd,
- (XtPointer *)XtInputWriteMask,
- (XtInputCallbackProc) _GSocket_Motif_Output,
- (XtPointer) socket);
+ XtRemoveInput(fd);
}
-}
+};
-void GSocketGUIFunctionsTableConcrete::Uninstall_Callback(GSocket *socket, GSocketEvent event)
+GSocketManager *wxGUIAppTraits::GetSocketManager()
{
- int *m_id = (int *)(socket->m_gui_dependent);
- int c;
-
- switch (event)
- {
- case GSOCK_LOST: /* fall-through */
- case GSOCK_INPUT: c = 0; break;
- case GSOCK_OUTPUT: c = 1; break;
- case GSOCK_CONNECTION: c = ((socket->m_server) ? 0 : 1); break;
- default: return;
- }
-
- if (m_id[c] != -1)
- XtRemoveInput(m_id[c]);
-
- m_id[c] = -1;
+ static MotifSocketManager s_manager;
+ return &s_manager;
}
-void GSocketGUIFunctionsTableConcrete::Enable_Events(GSocket *socket)
-{
- Install_Callback(socket, GSOCK_INPUT);
- Install_Callback(socket, GSOCK_OUTPUT);
-}
-
-void GSocketGUIFunctionsTableConcrete::Disable_Events(GSocket *socket)
-{
- Uninstall_Callback(socket, GSOCK_INPUT);
- Uninstall_Callback(socket, GSOCK_OUTPUT);
-}
-
-#else /* !wxUSE_SOCKETS */
-
-/* some compilers don't like having empty source files */
-static int wxDummyGsockVar = 0;
-
-#endif /* wxUSE_SOCKETS/!wxUSE_SOCKETS */
+#endif // wxUSE_SOCKETS
// wxAppTraits implementation
// ============================================================================
+GSocketManager *wxAppTraits::ms_manager = NULL;
+
WXDWORD wxAppTraits::DoSimpleWaitForThread(WXHANDLE hThread)
{
return ::WaitForSingleObject((HANDLE)hThread, INFINITE);
}
else
{
- wxLogDebug(_T("Ignoring unexpected message %d"), msg.message);
+ ::DispatchMessage(&msg);
}
return !m_shouldExit;
#include <winsock.h>
-#ifndef __GSOCKET_STANDALONE__
-# include "wx/platform.h"
-#endif
+#include "wx/platform.h"
-#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
+#if wxUSE_SOCKETS
-#ifndef __GSOCKET_STANDALONE__
-# include "wx/msw/gsockmsw.h"
-# include "wx/gsocket.h"
-#else
-# include "gsockmsw.h"
-# include "gsocket.h"
-#endif /* __GSOCKET_STANDALONE__ */
+#include "wx/gsocket.h"
-#ifndef __WXWINCE__
-#include <assert.h>
-#else
-#define assert(x)
+#ifdef __WXWINCE__
#ifndef isdigit
#define isdigit(x) (x > 47 && x < 58)
#endif
typedef struct sockaddr wxSockAddr;
#endif
-
-/* Table of GUI-related functions. We must call them indirectly because
- * of wxBase and GUI separation: */
-
-static GSocketGUIFunctionsTable *gs_gui_functions;
-
-class GSocketGUIFunctionsTableNull: public GSocketGUIFunctionsTable
-{
-public:
- virtual bool OnInit();
- virtual void OnExit();
- virtual bool CanUseEventLoop();
- virtual bool Init_Socket(GSocket *socket);
- virtual void Destroy_Socket(GSocket *socket);
- virtual void Enable_Events(GSocket *socket);
- virtual void Disable_Events(GSocket *socket);
-};
-
-bool GSocketGUIFunctionsTableNull::OnInit()
-{ return true; }
-void GSocketGUIFunctionsTableNull::OnExit()
-{}
-bool GSocketGUIFunctionsTableNull::CanUseEventLoop()
-{ return false; }
-bool GSocketGUIFunctionsTableNull::Init_Socket(GSocket *WXUNUSED(socket))
-{ return true; }
-void GSocketGUIFunctionsTableNull::Destroy_Socket(GSocket *WXUNUSED(socket))
-{}
-void GSocketGUIFunctionsTableNull::Enable_Events(GSocket *WXUNUSED(socket))
-{}
-void GSocketGUIFunctionsTableNull::Disable_Events(GSocket *WXUNUSED(socket))
-{}
-/* Global initialisers */
-
-void GSocket_SetGUIFunctions(GSocketGUIFunctionsTable *guifunc)
-{
- gs_gui_functions = guifunc;
-}
-
-int GSocket_Init(void)
+bool GSocket_Init()
{
WSADATA wsaData;
- if (!gs_gui_functions)
- {
- static GSocketGUIFunctionsTableNull table;
- gs_gui_functions = &table;
- }
- if ( !gs_gui_functions->OnInit() )
- {
- return 0;
- }
+ GSocketManager * const manager = GSocketManager::Get();
+ if ( !manager || !manager->OnInit() )
+ return false;
/* Initialize WinSocket */
- return (WSAStartup((1 << 8) | 1, &wsaData) == 0);
+ return WSAStartup((1 << 8) | 1, &wsaData) == 0;
}
-void GSocket_Cleanup(void)
+void GSocket_Cleanup()
{
- if (gs_gui_functions)
- {
- gs_gui_functions->OnExit();
- }
+ GSocketManager * const manager = GSocketManager::Get();
+ if ( manager )
+ manager->OnExit();
/* Cleanup WinSocket */
WSACleanup();
m_timeout.tv_usec = 0;
m_establishing = false;
m_reusable = false;
- m_broadcast = false;
+ m_broadcast = false;
m_dobind = true;
m_initialRecvBufferSize = -1;
m_initialSendBufferSize = -1;
- assert(gs_gui_functions);
- /* Per-socket GUI-specific initialization */
- m_ok = gs_gui_functions->Init_Socket(this);
+ m_ok = GSocketManager::Get()->Init_Socket(this);
}
void GSocket::Close()
{
- gs_gui_functions->Disable_Events(this);
+ GSocketManager::Get()->Disable_Events(this);
closesocket(m_fd);
m_fd = INVALID_SOCKET;
}
GSocket::~GSocket()
{
- assert(this);
-
- /* Per-socket GUI-specific cleanup */
- gs_gui_functions->Destroy_Socket(this);
+ GSocketManager::Get()->Destroy_Socket(this);
/* Check that the socket is really shutdowned */
if (m_fd != INVALID_SOCKET)
{
int evt;
- assert(this);
-
/* If socket has been created, shutdown it */
if (m_fd != INVALID_SOCKET)
{
*/
GSocketError GSocket::SetLocal(GAddress *address)
{
- assert(this);
-
/* the socket must be initialized, or it must be a server */
if (m_fd != INVALID_SOCKET && !m_server)
{
GSocketError GSocket::SetPeer(GAddress *address)
{
- assert(this);
-
/* check address */
if (address == NULL || address->m_family == GSOCK_NOFAMILY)
{
WX_SOCKLEN_T size = sizeof(addr);
GSocketError err;
- assert(this);
-
/* try to get it from the m_local var first */
if (m_local)
return GAddress_copy(m_local);
GAddress *GSocket::GetPeer()
{
- assert(this);
-
/* try to get it from the m_peer var */
if (m_peer)
return GAddress_copy(m_peer);
{
u_long arg = 1;
- assert(this);
-
/* must not be in use */
if (m_fd != INVALID_SOCKET)
{
}
ioctlsocket(m_fd, FIONBIO, (u_long FAR *) &arg);
- gs_gui_functions->Enable_Events(this);
+ GSocketManager::Get()->Enable_Events(this);
/* allow a socket to re-bind if the socket is in the TIME_WAIT
state after being previously closed.
GSocketError err;
u_long arg = 1;
- assert(this);
-
/* Reenable CONNECTION events */
m_detected &= ~GSOCK_CONNECTION_FLAG;
}
ioctlsocket(connection->m_fd, FIONBIO, (u_long FAR *) &arg);
- gs_gui_functions->Enable_Events(connection);
+ GSocketManager::Get()->Enable_Events(connection);
return connection;
}
int ret, err;
u_long arg = 1;
- assert(this);
-
/* Enable CONNECTION events (needed for nonblocking connections) */
m_detected &= ~GSOCK_CONNECTION_FLAG;
}
ioctlsocket(m_fd, FIONBIO, (u_long FAR *) &arg);
- gs_gui_functions->Enable_Events(this);
+ GSocketManager::Get()->Enable_Events(this);
// If the reuse flag is set, use the applicable socket reuse flag
if (m_reusable)
{
u_long arg = 1;
- assert(this);
-
if (m_fd != INVALID_SOCKET)
{
m_error = GSOCK_INVSOCK;
}
ioctlsocket(m_fd, FIONBIO, (u_long FAR *) &arg);
- gs_gui_functions->Enable_Events(this);
+ GSocketManager::Get()->Enable_Events(this);
if (m_reusable)
{
{
int ret;
- assert(this);
-
/* Reenable INPUT events */
m_detected &= ~GSOCK_INPUT_FLAG;
{
int ret;
- assert(this);
-
if (m_fd == INVALID_SOCKET || m_server)
{
m_error = GSOCK_INVSOCK;
*/
GSocketEventFlags GSocket::Select(GSocketEventFlags flags)
{
- if (!gs_gui_functions->CanUseEventLoop())
- {
- GSocketEventFlags result = 0;
- fd_set readfds;
- fd_set writefds;
- fd_set exceptfds;
-
- assert(this);
-
- FD_ZERO(&readfds);
- FD_ZERO(&writefds);
- FD_ZERO(&exceptfds);
- FD_SET(m_fd, &readfds);
- if (flags & GSOCK_OUTPUT_FLAG || flags & GSOCK_CONNECTION_FLAG)
- FD_SET(m_fd, &writefds);
- FD_SET(m_fd, &exceptfds);
-
- /* Check 'sticky' CONNECTION flag first */
- result |= (GSOCK_CONNECTION_FLAG & m_detected);
-
- /* If we have already detected a LOST event, then don't try
- * to do any further processing.
- */
- if ((m_detected & GSOCK_LOST_FLAG) != 0)
- {
- m_establishing = false;
-
- return (GSOCK_LOST_FLAG & flags);
- }
-
- /* Try select now */
- if (select(m_fd + 1, &readfds, &writefds, &exceptfds,
- &m_timeout) <= 0)
- {
- /* What to do here? */
- return (result & flags);
- }
-
- /* Check for exceptions and errors */
- if (FD_ISSET(m_fd, &exceptfds))
- {
- m_establishing = false;
- m_detected = GSOCK_LOST_FLAG;
-
- /* LOST event: Abort any further processing */
- return (GSOCK_LOST_FLAG & flags);
- }
-
- /* Check for readability */
- if (FD_ISSET(m_fd, &readfds))
- {
- result |= GSOCK_INPUT_FLAG;
-
- if (m_server && m_stream)
- {
- /* This is a TCP server socket that detected a connection.
- While the INPUT_FLAG is also set, it doesn't matter on
- this kind of sockets, as we can only Accept() from them. */
- result |= GSOCK_CONNECTION_FLAG;
- m_detected |= GSOCK_CONNECTION_FLAG;
- }
- }
-
- /* Check for writability */
- if (FD_ISSET(m_fd, &writefds))
- {
- if (m_establishing && !m_server)
- {
- int error;
- WX_SOCKLEN_T len = sizeof(error);
-
- m_establishing = false;
-
- getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (char*)&error, &len);
-
- if (error)
- {
- m_detected = GSOCK_LOST_FLAG;
-
- /* LOST event: Abort any further processing */
- return (GSOCK_LOST_FLAG & flags);
- }
- else
- {
- result |= GSOCK_CONNECTION_FLAG;
- m_detected |= GSOCK_CONNECTION_FLAG;
- }
- }
- else
- {
- result |= GSOCK_OUTPUT_FLAG;
- }
- }
-
- return (result & flags);
- }
- else /* USE_GUI() */
- {
- assert(this);
- return flags & m_detected;
- }
+ return flags & m_detected;
}
/* Attributes */
*/
void GSocket::SetNonBlocking(bool non_block)
{
- assert(this);
-
m_non_blocking = non_block;
}
*/
void GSocket::SetTimeout(unsigned long millis)
{
- assert(this);
-
m_timeout.tv_sec = (millis / 1000);
m_timeout.tv_usec = (millis % 1000) * 1000;
}
*/
GSocketError WXDLLIMPEXP_NET GSocket::GetError()
{
- assert(this);
-
return m_error;
}
{
int count;
- assert(this);
-
for (count = 0; count < GSOCK_MAX_EVENT; count++)
{
if ((flags & (1 << count)) != 0)
{
int count;
- assert(this);
-
for (count = 0; count < GSOCK_MAX_EVENT; count++)
{
if ((flags & (1 << count)) != 0)
}
/* Compatibility functions for GSocket */
-GSocket *GSocket_new(void)
+GSocket *GSocket_new()
{
GSocket *newsocket = new GSocket();
if(newsocket->IsOk())
}
-GAddress *GAddress_new(void)
+GAddress *GAddress_new()
{
GAddress *address;
{
GAddress *addr2;
- assert(address != NULL);
-
if ((addr2 = (GAddress *) malloc(sizeof(GAddress))) == NULL)
return NULL;
void GAddress_destroy(GAddress *address)
{
- assert(address != NULL);
-
if (address->m_addr)
free(address->m_addr);
void GAddress_SetFamily(GAddress *address, GAddressType type)
{
- assert(address != NULL);
-
address->m_family = type;
}
GAddressType GAddress_GetFamily(GAddress *address)
{
- assert(address != NULL);
-
return address->m_family;
}
struct hostent *he;
struct in_addr *addr;
- assert(address != NULL);
-
CHECK_ADDRESS(address, INET);
addr = &(((struct sockaddr_in *)address->m_addr)->sin_addr);
{
struct in_addr *addr;
- assert(address != NULL);
-
CHECK_ADDRESS(address, INET);
addr = &(((struct sockaddr_in *)address->m_addr)->sin_addr);
struct servent *se;
struct sockaddr_in *addr;
- assert(address != NULL);
CHECK_ADDRESS(address, INET);
if (!port)
{
struct sockaddr_in *addr;
- assert(address != NULL);
CHECK_ADDRESS(address, INET);
addr = (struct sockaddr_in *)address->m_addr;
char *addr_buf;
struct sockaddr_in *addr;
- assert(address != NULL);
CHECK_ADDRESS(address, INET);
addr = (struct sockaddr_in *)address->m_addr;
{
struct sockaddr_in *addr;
- assert(address != NULL);
CHECK_ADDRESS_RETVAL(address, INET, 0);
addr = (struct sockaddr_in *)address->m_addr;
{
struct sockaddr_in *addr;
- assert(address != NULL);
CHECK_ADDRESS_RETVAL(address, INET, 0);
addr = (struct sockaddr_in *)address->m_addr;
GSocketError GAddress_INET6_SetHostName(GAddress *address, const char *hostname)
{
- assert(address != NULL);
CHECK_ADDRESS(address, INET6);
addrinfo hints;
GSocketError GAddress_INET6_SetAnyAddress(GAddress *address)
{
- assert(address != NULL);
-
CHECK_ADDRESS(address, INET6);
struct in6_addr addr;
GSocketError GAddress_INET6_SetHostAddress(GAddress *address,
struct in6_addr hostaddr)
{
- assert(address != NULL);
-
CHECK_ADDRESS(address, INET6);
((struct sockaddr_in6 *)address->m_addr)->sin6_addr = hostaddr;
struct servent *se;
struct sockaddr_in6 *addr;
- assert(address != NULL);
CHECK_ADDRESS(address, INET6);
if (!port)
{
struct sockaddr_in6 *addr;
- assert(address != NULL);
CHECK_ADDRESS(address, INET6);
addr = (struct sockaddr_in6 *)address->m_addr;
char *addr_buf;
struct sockaddr_in6 *addr;
- assert(address != NULL);
CHECK_ADDRESS(address, INET6);
addr = (struct sockaddr_in6 *)address->m_addr;
GSocketError GAddress_INET6_GetHostAddress(GAddress *address,struct in6_addr *hostaddr)
{
- assert(address != NULL);
- assert(hostaddr != NULL);
CHECK_ADDRESS_RETVAL(address, INET6, GSOCK_INVADDR);
*hostaddr = ( (struct sockaddr_in6 *)address->m_addr )->sin6_addr;
return GSOCK_NOERROR;
unsigned short GAddress_INET6_GetPort(GAddress *address)
{
- assert(address != NULL);
CHECK_ADDRESS_RETVAL(address, INET6, 0);
return ntohs( ((struct sockaddr_in6 *)address->m_addr)->sin6_port );
GSocketError _GAddress_Init_UNIX(GAddress *address)
{
- assert (address != NULL);
address->m_error = GSOCK_INVADDR;
return GSOCK_INVADDR;
}
GSocketError GAddress_UNIX_SetPath(GAddress *address, const char *WXUNUSED(path))
{
- assert (address != NULL);
address->m_error = GSOCK_INVADDR;
return GSOCK_INVADDR;
}
GSocketError GAddress_UNIX_GetPath(GAddress *address, char *WXUNUSED(path), size_t WXUNUSED(sbuf))
{
- assert (address != NULL);
address->m_error = GSOCK_INVADDR;
return GSOCK_INVADDR;
}
-#else /* !wxUSE_SOCKETS */
-
-/*
- * Translation unit shouldn't be empty, so include this typedef to make the
- * compiler (VC++ 6.0, for example) happy
- */
-typedef void (*wxDummy)();
-
-#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
+#endif // wxUSE_SOCKETS
#pragma hdrstop
#endif
+#if wxUSE_SOCKETS
+
/*
* DONE: for WinCE we need to replace WSAAsyncSelect
* (Windows message-based notification of network events for a socket)
# pragma warning(disable:4115) /* named type definition in parentheses */
#endif
-/* This needs to be before the wx/defs/h inclusion
- * for some reason
- */
-
-#ifdef __WXWINCE__
- /* windows.h results in tons of warnings at max warning level */
-# ifdef _MSC_VER
-# pragma warning(push, 1)
-# endif
-# include <windows.h>
-# ifdef _MSC_VER
-# pragma warning(pop)
-# pragma warning(disable:4514)
-# endif
-#endif
-
-#ifndef __GSOCKET_STANDALONE__
-# include "wx/platform.h"
-#endif
-
-#if wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__)
-
-#ifndef __GSOCKET_STANDALONE__
-
-#include "wx/msw/gsockmsw.h"
#include "wx/gsocket.h"
+#include "wx/apptrait.h"
-extern "C" WXDLLIMPEXP_BASE HINSTANCE wxGetInstance(void);
+extern "C" WXDLLIMPEXP_BASE HINSTANCE wxGetInstance();
#define INSTANCE wxGetInstance()
-#else /* __GSOCKET_STANDALONE__ */
-
-#include "gsockmsw.h"
-#include "gsocket.h"
-
-/* If not using wxWidgets, a global var called hInst must
- * be available and it must contain the app's instance
- * handle.
- */
-extern HINSTANCE hInst;
-#define INSTANCE hInst
-
-#endif /* !__GSOCKET_STANDALONE__/__GSOCKET_STANDALONE__ */
-
-#ifndef __WXWINCE__
-#include <assert.h>
-#else
-#define assert(x)
+#ifdef __WXWINCE__
#include <winsock.h>
#include "wx/msw/wince/net.h"
#include "wx/hashmap.h"
long lNetworkEvents;
int iErrorCode[10];
} WSANETWORKEVENTS, FAR * LPWSANETWORKEVENTS;
-typedef HANDLE (PASCAL *WSACreateEventFunc)(void);
+typedef HANDLE (PASCAL *WSACreateEventFunc)();
typedef int (PASCAL *WSAEventSelectFunc)(SOCKET,HANDLE,long);
typedef int (PASCAL *WSAWaitForMultipleEventsFunc)(long,HANDLE,BOOL,long,BOOL);
typedef int (PASCAL *WSAEnumNetworkEventsFunc)(SOCKET,HANDLE,LPWSANETWORKEVENTS);
}
#endif
+// ----------------------------------------------------------------------------
+// MSW implementation of GSocketManager
+// ----------------------------------------------------------------------------
-bool GSocketGUIFunctionsTableConcrete::CanUseEventLoop()
+class GSocketMSWManager : public GSocketManager
{
- return true;
-}
+public:
+ virtual bool OnInit();
+ virtual void OnExit();
+
+ virtual bool Init_Socket(GSocket *socket);
+ virtual void Destroy_Socket(GSocket *socket);
+
+ virtual void Install_Callback(GSocket *socket, GSocketEvent event);
+ virtual void Uninstall_Callback(GSocket *socket, GSocketEvent event);
+
+ virtual void Enable_Events(GSocket *socket);
+ virtual void Disable_Events(GSocket *socket);
+};
/* Global initializers */
-bool GSocketGUIFunctionsTableConcrete::OnInit()
+bool GSocketMSWManager::OnInit()
{
static LPCTSTR pclassname = NULL;
int i;
return true;
}
-void GSocketGUIFunctionsTableConcrete::OnExit()
+void GSocketMSWManager::OnExit()
{
#ifdef __WXWINCE__
/* Delete the threads here */
/* Per-socket GUI initialization / cleanup */
-bool GSocketGUIFunctionsTableConcrete::Init_Socket(GSocket *socket)
+bool GSocketMSWManager::Init_Socket(GSocket *socket)
{
int i;
return true;
}
-void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
+void GSocketMSWManager::Destroy_Socket(GSocket *socket)
{
/* Remove the socket from the list */
EnterCriticalSection(&critical);
LeaveCriticalSection(&critical);
}
+void GSocketMSWManager::Install_Callback(GSocket * WXUNUSED(socket),
+ GSocketEvent WXUNUSED(event))
+{
+ wxFAIL_MSG( _T("not used under MSW") );
+}
+
+void GSocketMSWManager::Uninstall_Callback(GSocket * WXUNUSED(socket),
+ GSocketEvent WXUNUSED(event))
+{
+ wxFAIL_MSG( _T("not used under MSW") );
+}
+
/* Windows proc for asynchronous event handling */
LRESULT CALLBACK _GSocket_Internal_WinProc(HWND hWnd,
* events for internal processing, but we will only notify users
* when an appropiate callback function has been installed.
*/
-void GSocketGUIFunctionsTableConcrete::Enable_Events(GSocket *socket)
+void GSocketMSWManager::Enable_Events(GSocket *socket)
{
- assert (socket != NULL);
-
if (socket->m_fd != INVALID_SOCKET)
{
/* We could probably just subscribe to all events regardless
/* _GSocket_Disable_Events:
* Disable event notifications (when shutdowning the socket)
*/
-void GSocketGUIFunctionsTableConcrete::Disable_Events(GSocket *socket)
+void GSocketMSWManager::Disable_Events(GSocket *socket)
{
- assert (socket != NULL);
-
if (socket->m_fd != INVALID_SOCKET)
{
#ifndef __WXWINCE__
}
}
-#else /* !wxUSE_SOCKETS */
-
-/*
- * Translation unit shouldn't be empty, so include this typedef to make the
- * compiler (VC++ 6.0, for example) happy
- */
-typedef void (*wxDummy)();
+// set the wxBase variable to point to our GSocketManager implementation
+//
+// see comments in wx/msw/apptbase.h for the explanation of why do we do it
+// like this
+static struct ManagerSetter
+{
+ ManagerSetter()
+ {
+ static GSocketMSWManager s_manager;
+ wxAppTraits::SetDefaultSocketManager(&s_manager);
+ }
+} gsm_managerSetter;
-#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
+#endif // wxUSE_SOCKETS
socket->Detected_Write();
}
-bool GSocketGUIFunctionsTableConcrete::CanUseEventLoop()
-{ return true; }
-
-bool GSocketGUIFunctionsTableConcrete::OnInit(void)
-{
- return 1;
-}
-
-void GSocketGUIFunctionsTableConcrete::OnExit(void)
-{
-}
-
-bool GSocketGUIFunctionsTableConcrete::Init_Socket(GSocket *socket)
-{
- int *m_id;
- socket->m_gui_dependent = (char *)malloc(sizeof(int)*2);
- m_id = (int *)(socket->m_gui_dependent);
-
- m_id[0] = -1;
- m_id[1] = -1;
- return true;
-}
-
-void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
-{
- free(socket->m_gui_dependent);
-}
-
void GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket *socket, GSocketEvent event)
{
int *m_id = (int *)(socket->m_gui_dependent);
#include "wx/apptrait.h"
#include "wx/unix/execute.h"
#include "wx/evtloop.h"
+#include "wx/gsocket.h"
#include "wx/unix/private/timer.h"
wxLogSysError(_("Failed to create epoll descriptor"));
return NULL;
}
-
+ wxLogTrace(wxEpollDispatcher_Trace,
+ _T("Epoll fd %d created"), epollDescriptor);
return new wxEpollDispatcher(epollDescriptor);
}
return false;
}
+ wxLogTrace(wxEpollDispatcher_Trace,
+ _T("Added fd %d (handler %p) to epoll %d"), fd, handler, m_epollDescriptor);
return true;
}
return false;
}
+ wxLogTrace(wxEpollDispatcher_Trace,
+ _T("Modified fd %d (handler: %p) on epoll %d"), fd, handler, m_epollDescriptor);
return true;
}
wxLogSysError(_("Failed to unregister descriptor %d from epoll descriptor %d"),
fd, m_epollDescriptor);
}
-
+ wxLogTrace(wxEpollDispatcher_Trace,
+ _T("removed fd %d from %d"), fd, m_epollDescriptor);
return true;
}
#ifndef __GSOCKET_STANDALONE__
#include "wx/defs.h"
#include "wx/private/gsocketiohandler.h"
+#include "wx/thread.h" // for wxThread::IsMain() used in assert
#endif
#if defined(__VISAGECPP__)
/* Table of GUI-related functions. We must call them indirectly because
* of wxBase and GUI separation: */
-static GSocketGUIFunctionsTable *gs_gui_functions;
-
-class GSocketGUIFunctionsTableNull: public GSocketGUIFunctionsTable
-{
-public:
- virtual bool OnInit();
- virtual void OnExit();
- virtual bool CanUseEventLoop();
- virtual bool Init_Socket(GSocket *socket);
- virtual void Destroy_Socket(GSocket *socket);
- virtual void Install_Callback(GSocket *socket, GSocketEvent event);
- virtual void Uninstall_Callback(GSocket *socket, GSocketEvent event);
- virtual void Enable_Events(GSocket *socket);
- virtual void Disable_Events(GSocket *socket);
-};
-
-bool GSocketGUIFunctionsTableNull::OnInit()
-{ return true; }
-void GSocketGUIFunctionsTableNull::OnExit()
-{}
-bool GSocketGUIFunctionsTableNull::CanUseEventLoop()
-{ return false; }
-bool GSocketGUIFunctionsTableNull::Init_Socket(GSocket *WXUNUSED(socket))
-{ return true; }
-void GSocketGUIFunctionsTableNull::Destroy_Socket(GSocket *WXUNUSED(socket))
-{}
-void GSocketGUIFunctionsTableNull::Install_Callback(GSocket *WXUNUSED(socket), GSocketEvent WXUNUSED(event))
-{}
-void GSocketGUIFunctionsTableNull::Uninstall_Callback(GSocket *WXUNUSED(socket), GSocketEvent WXUNUSED(event))
-{}
-void GSocketGUIFunctionsTableNull::Enable_Events(GSocket *WXUNUSED(socket))
-{}
-void GSocketGUIFunctionsTableNull::Disable_Events(GSocket *WXUNUSED(socket))
-{}
-/* Global initialisers */
-
-void GSocket_SetGUIFunctions(GSocketGUIFunctionsTable *guifunc)
+bool GSocket_Init()
{
- gs_gui_functions = guifunc;
+ GSocketManager * const manager = GSocketManager::Get();
+ return manager && manager->OnInit();
}
-int GSocket_Init(void)
+void GSocket_Cleanup()
{
- if (!gs_gui_functions)
- {
- static GSocketGUIFunctionsTableNull table;
- gs_gui_functions = &table;
- }
- if ( !gs_gui_functions->OnInit() )
- return 0;
- return 1;
-}
-
-void GSocket_Cleanup(void)
-{
- if (gs_gui_functions)
- {
- gs_gui_functions->OnExit();
- }
+ GSocketManager * const manager = GSocketManager::Get();
+ if ( manager )
+ manager->OnExit();
}
/* Constructors / Destructors for GSocket */
m_timeout = 10*60*1000;
/* 10 minutes * 60 sec * 1000 millisec */
m_establishing = false;
+ m_use_events = false;
m_initialRecvBufferSize = -1;
m_initialSendBufferSize = -1;
- assert(gs_gui_functions);
- /* Per-socket GUI-specific initialization */
- m_ok = gs_gui_functions->Init_Socket(this);
+ m_ok = GSocketManager::Get()->Init_Socket(this);
}
void GSocket::Close()
{
- gs_gui_functions->Disable_Events(this);
+ if (m_use_events)
+ DisableEvents();
/* When running on OS X, the gsockosx implementation of GSocketGUIFunctionsTable
will close the socket during Disable_Events. However, it will only do this
if (m_fd != INVALID_SOCKET)
Shutdown();
- /* Per-socket GUI-specific cleanup */
- gs_gui_functions->Destroy_Socket(this);
+ GSocketManager::Get()->Destroy_Socket(this);
delete m_handler;
if (m_peer)
GAddress_destroy(m_peer);
+
}
/* GSocket_Shutdown:
assert(this);
/* Don't allow events to fire after socket has been closed */
- gs_gui_functions->Disable_Events(this);
+ if (m_use_events)
+ DisableEvents();
/* If socket has been created, shutdown it */
if (m_fd != INVALID_SOCKET)
#endif
ioctl(m_fd, FIONBIO, &arg);
- gs_gui_functions->Enable_Events(this);
+ if (m_use_events)
+ EnableEvents();
/* allow a socket to re-bind if the socket is in the TIME_WAIT
state after being previously closed.
#else
ioctl(connection->m_fd, FIONBIO, &arg);
#endif
- gs_gui_functions->Enable_Events(connection);
+ if (m_use_events)
+ connection->Notify(true);
return connection;
}
+void GSocket::Notify(bool flag)
+{
+ if (flag == m_use_events)
+ return;
+ // it is not safe to attach or detach i/o descriptor in child thread
+ wxASSERT_MSG( wxThread::IsMain(), "should be called in main thread only" );
+ m_use_events = flag;
+ EnableEvents(flag);
+}
+
+void GSocket::EnableEvents(bool flag)
+{
+ if (flag)
+ GSocketManager::Get()->Enable_Events(this);
+ else
+ GSocketManager::Get()->Disable_Events(this);
+}
+
bool GSocket::SetReusable()
{
/* socket must not be null, and must not be in use/already bound */
* call to Enable_Events now.
*/
- if (m_non_blocking || ret == 0)
- gs_gui_functions->Enable_Events(this);
+ if (m_use_events && (m_non_blocking || ret == 0))
+ EnableEvents();
if (ret == -1)
{
SOCKOPTLEN_T len = sizeof(error);
getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (char*) &error, &len);
-
- gs_gui_functions->Enable_Events(this);
+ if (m_use_events)
+ EnableEvents();
if (!error)
return GSOCK_NOERROR;
#else
ioctl(m_fd, FIONBIO, &arg);
#endif
- gs_gui_functions->Enable_Events(this);
+ if (m_use_events)
+ EnableEvents();
if (m_reusable)
{
if (ret == 0)
{
/* Make sure wxSOCKET_LOST event gets sent and shut down the socket */
- m_detected = GSOCK_LOST_FLAG;
- Detected_Read();
- return 0;
+ if (m_use_events)
+ {
+ m_detected = GSOCK_LOST_FLAG;
+ Detected_Read();
+ return 0;
+ }
}
else if (ret == -1)
{
*/
GSocketEventFlags GSocket::Select(GSocketEventFlags flags)
{
- if (!gs_gui_functions->CanUseEventLoop())
- {
-
- GSocketEventFlags result = 0;
- fd_set readfds;
- fd_set writefds;
- fd_set exceptfds;
- struct timeval tv;
-
- assert(this);
-
- if (m_fd == -1)
- return (GSOCK_LOST_FLAG & flags);
-
- /* Do not use a static struct, Linux can garble it */
- tv.tv_sec = m_timeout / 1000;
- tv.tv_usec = (m_timeout % 1000) * 1000;
-
- wxFD_ZERO(&readfds);
- wxFD_ZERO(&writefds);
- wxFD_ZERO(&exceptfds);
- wxFD_SET(m_fd, &readfds);
- if (flags & GSOCK_OUTPUT_FLAG || flags & GSOCK_CONNECTION_FLAG)
- wxFD_SET(m_fd, &writefds);
- wxFD_SET(m_fd, &exceptfds);
-
- /* Check 'sticky' CONNECTION flag first */
- result |= (GSOCK_CONNECTION_FLAG & m_detected);
-
- /* If we have already detected a LOST event, then don't try
- * to do any further processing.
- */
- if ((m_detected & GSOCK_LOST_FLAG) != 0)
- {
- m_establishing = false;
-
- return (GSOCK_LOST_FLAG & flags);
- }
-
- /* Try select now */
- if (select(m_fd + 1, &readfds, &writefds, &exceptfds, &tv) <= 0)
- {
- /* What to do here? */
- return (result & flags);
- }
-
- /* Check for exceptions and errors */
- if (wxFD_ISSET(m_fd, &exceptfds))
- {
- m_establishing = false;
- m_detected = GSOCK_LOST_FLAG;
-
- /* LOST event: Abort any further processing */
- return (GSOCK_LOST_FLAG & flags);
- }
-
- /* Check for readability */
- if (wxFD_ISSET(m_fd, &readfds))
- {
- result |= GSOCK_INPUT_FLAG;
-
- if (m_server && m_stream)
- {
- /* This is a TCP server socket that detected a connection.
- While the INPUT_FLAG is also set, it doesn't matter on
- this kind of sockets, as we can only Accept() from them. */
- result |= GSOCK_CONNECTION_FLAG;
- m_detected |= GSOCK_CONNECTION_FLAG;
- }
- }
-
- /* Check for writability */
- if (wxFD_ISSET(m_fd, &writefds))
- {
- if (m_establishing && !m_server)
- {
- int error;
- SOCKOPTLEN_T len = sizeof(error);
-
- m_establishing = false;
-
- getsockopt(m_fd, SOL_SOCKET, SO_ERROR, (char*)&error, &len);
-
- if (error)
- {
- m_detected = GSOCK_LOST_FLAG;
-
- /* LOST event: Abort any further processing */
- return (GSOCK_LOST_FLAG & flags);
- }
- else
- {
- result |= GSOCK_CONNECTION_FLAG;
- m_detected |= GSOCK_CONNECTION_FLAG;
- }
- }
- else
- {
- result |= GSOCK_OUTPUT_FLAG;
- }
- }
-
- return (result & flags);
+ assert(this);
- }
- else
- {
- assert(this);
- return flags & m_detected;
- }
+ return flags & m_detected;
}
/* Flags */
void GSocket::Enable(GSocketEvent event)
{
- m_detected &= ~(1 << event);
- gs_gui_functions->Install_Callback(this, event);
+ if (m_use_events)
+ {
+ m_detected &= ~(1 << event);
+ GSocketManager::Get()->Install_Callback(this, event);
+ }
}
void GSocket::Disable(GSocketEvent event)
{
- m_detected |= (1 << event);
- gs_gui_functions->Uninstall_Callback(this, event);
+ if (m_use_events)
+ {
+ m_detected |= (1 << event);
+ GSocketManager::Get()->Uninstall_Callback(this, event);
+ }
}
/* _GSocket_Input_Timeout:
wx/zipstrm.h
wx/zstream.h
wx/private/fdiodispatcher.h
+wx/private/gsocketiohandler.h
wx/private/selectdispatcher.h
wx/unix/app.h
wx/unix/apptbase.h
wx/zipstrm.h
wx/zstream.h
wx/private/fdiodispatcher.h
+wx/private/gsocketiohandler.h
wx/private/selectdispatcher.h
wx/unix/app.h
wx/unix/apptbase.h
wx/zipstrm.h
wx/zstream.h
wx/private/fdiodispatcher.h
+wx/private/gsocketiohandler.h
wx/private/selectdispatcher.h
wx/unix/app.h
wx/unix/apptbase.h