]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/socket.cpp
wxArrayStringProperty::m_delimiter default value was missing. Also cleaned up relevan...
[wxWidgets.git] / src / common / socket.cpp
index 923dff0d490483b0af896cfb918b2203f35157d4..182cf510c6785979656077e04ef40684f872cc77 100644 (file)
@@ -7,7 +7,7 @@
 //             (C) 1999-2000, Guillermo Rodriguez Garcia
 //             (C) 2008 Vadim Zeitlin
 // RCS_ID:     $Id$
-// License:    wxWindows licence
+// Licence:    wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ==========================================================================
@@ -1109,6 +1109,9 @@ wxSocketBase& wxSocketBase::Peek(void* buffer, wxUint32 nbytes)
 {
     wxSocketReadGuard read(this);
 
+    // Peek() should never block
+    wxSocketWaitModeChanger changeFlags(this, wxSOCKET_NOWAIT);
+
     m_lcount = DoRead(buffer, nbytes);
 
     Pushback(buffer, m_lcount);
@@ -1786,8 +1789,7 @@ wxSocketServer::wxSocketServer(const wxSockAddress& addr,
 
     if (m_impl->CreateServer() != wxSOCKET_NOERROR)
     {
-        delete m_impl;
-        m_impl = NULL;
+        wxDELETE(m_impl);
 
         wxLogTrace( wxTRACE_Socket, wxT("*** CreateServer() failed") );
         return;
@@ -2027,8 +2029,7 @@ wxDatagramSocket::wxDatagramSocket( const wxSockAddress& addr,
 
     if ( m_impl->CreateUDP() != wxSOCKET_NOERROR )
     {
-        delete m_impl;
-        m_impl = NULL;
+        wxDELETE(m_impl);
         return;
     }
 
@@ -2096,7 +2097,7 @@ wxFORCE_LINK_MODULE( socketiohandler )
 #endif
 
 // and for OSXManagerSetter in the OS X one
-#ifdef __WXMAC__
+#ifdef __WXOSX__
     wxFORCE_LINK_MODULE( osxsocket )
 #endif