]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/core/sockosx.cpp
fixing some warnings
[wxWidgets.git] / src / osx / core / sockosx.cpp
index 08dbd21815e14f0245a401c2af2e0e23ac301dd9..07ae1a7f47a9f7893e0f14a89c3214a41917b7a6 100644 (file)
@@ -129,7 +129,7 @@ private:
         switch (callbackType)
         {
             case kCFSocketConnectCallBack:
-                wxASSERT(!socket->m_server);
+                wxASSERT(!socket->IsServer());
                 // 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.
@@ -137,15 +137,15 @@ private:
                 // 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();
+                    socket->OnWriteWaiting();
                 break;
 
             case kCFSocketReadCallBack:
-                socket->Detected_Read();
+                socket->OnReadWaiting();
                 break;
 
             case kCFSocketWriteCallBack:
-                socket->Detected_Write();
+                socket->OnWriteWaiting();
                 break;
 
             default:
@@ -219,18 +219,17 @@ int wxSocketManagerMac::GetCFCallback(wxSocketImpl *socket, wxSocketNotify event
     switch ( event )
     {
         case wxSOCKET_CONNECTION:
-            return socket->m_server ? kCFSocketReadCallBack
-                                    : kCFSocketConnectCallBack;
+            return socket->IsServer() ? kCFSocketReadCallBack
+                                      : kCFSocketConnectCallBack;
 
-        case wxSOCKET_LOST:
         case wxSOCKET_INPUT:
             return kCFSocketReadCallBack;
 
         case wxSOCKET_OUTPUT:
             return kCFSocketWriteCallBack;
 
-        case wxSOCKET_MAX_EVENT:
-            wxFAIL_MSG( "invalid wxSocketNotify" );
+        case wxSOCKET_LOST:
+            wxFAIL_MSG( "unexpected wxSocketNotify" );
             return 0;
 
         default: