X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..2ada746fb47bf68c9f2dab6399a6cd5510320984:/samples/sockets/server.cpp diff --git a/samples/sockets/server.cpp b/samples/sockets/server.cpp index 2702c113c4..cd8fe59d5b 100644 --- a/samples/sockets/server.cpp +++ b/samples/sockets/server.cpp @@ -36,9 +36,7 @@ // -------------------------------------------------------------------------- // the application icon -#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__) -# include "mondrian.xpm" -#endif +#include "mondrian.xpm" // -------------------------------------------------------------------------- // classes @@ -123,6 +121,9 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + // Create the main application window MyFrame *frame = new MyFrame(); @@ -170,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