X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/91b073576e8fd216c71acacf5c1495e1a56dd39f..b2b0bee6d822b05fea419e8bf24ab4009cb17ac4:/samples/sockets/server.cpp diff --git a/samples/sockets/server.cpp b/samples/sockets/server.cpp index 548ad955b6..cd8fe59d5b 100644 --- a/samples/sockets/server.cpp +++ b/samples/sockets/server.cpp @@ -17,11 +17,6 @@ // headers // -------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(__APPLE__) - #pragma implementation - #pragma interface -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -41,9 +36,7 @@ // -------------------------------------------------------------------------- // the application icon -#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__) -# include "mondrian.xpm" -#endif +#include "mondrian.xpm" // -------------------------------------------------------------------------- // classes @@ -128,6 +121,9 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + // Create the main application window MyFrame *frame = new MyFrame(); @@ -175,7 +171,11 @@ MyFrame::MyFrame() : wxFrame((wxFrame *)NULL, wxID_ANY, wxTE_MULTILINE | wxTE_READONLY); // Create the address - defaults to localhost:0 initially +#if wxUSE_IPV6 + wxIPV6address addr; +#else wxIPV4address addr; +#endif addr.Service(3000); // Create the socket