]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/sockunix.cpp
fix wxURL::GetInputStream() for URLs with special characters in credentials (closes...
[wxWidgets.git] / src / unix / sockunix.cpp
index 7fa43200ce8d3c9fe5cb1511eb08f1f978254069..31c04877c36fbac90c4427a5ff184dd933c279fe 100644 (file)
@@ -431,17 +431,13 @@ struct servent *wxGetservbyname_r(const char *port, const char *protocol,
 #  define SOCKET_DEBUG(args)
 #endif /* __GSOCKET_DEBUG__ */
 
 #  define SOCKET_DEBUG(args)
 #endif /* __GSOCKET_DEBUG__ */
 
-/* Constructors / Destructors for wxSocketImplUnix */
-
-wxSocketImplUnix::wxSocketImplUnix(wxSocketBase& wxsocket)
-    : wxSocketImpl(wxsocket)
+/* static */
+wxSocketImpl *wxSocketImpl::Create(wxSocketBase& wxsocket)
 {
 {
-    m_fds[0] =
-    m_fds[1] = -1;
-
-    m_use_events = false;
+    return new wxSocketImplUnix(wxsocket);
 }
 
 }
 
+
 /*
  *  Disallow further read/write operations on this socket, close
  *  the fd and disable all callbacks.
 /*
  *  Disallow further read/write operations on this socket, close
  *  the fd and disable all callbacks.
@@ -682,7 +678,7 @@ int wxSocketImplUnix::Read(char *buffer, int size)
       if (m_use_events)
       {
         m_detected = wxSOCKET_LOST_FLAG;
       if (m_use_events)
       {
         m_detected = wxSOCKET_LOST_FLAG;
-        Detected_Read();
+        OnReadWaiting();
         return 0;
       }
     }
         return 0;
       }
     }
@@ -984,11 +980,10 @@ void wxSocketImplUnix::OnStateChange(wxSocketNotify event)
         Shutdown();
 }
 
         Shutdown();
 }
 
-void wxSocketImplUnix::Detected_Read()
+void wxSocketImplUnix::OnReadWaiting()
 {
   char c;
 
 {
   char c;
 
-  /* Safeguard against straggling call to Detected_Read */
   if (m_fd == INVALID_SOCKET)
   {
     return;
   if (m_fd == INVALID_SOCKET)
   {
     return;
@@ -1045,7 +1040,7 @@ void wxSocketImplUnix::Detected_Read()
   }
 }
 
   }
 }
 
-void wxSocketImplUnix::Detected_Write()
+void wxSocketImplUnix::OnWriteWaiting()
 {
   /* If we have already detected a LOST event, then don't try
    * to do any further processing.
 {
   /* If we have already detected a LOST event, then don't try
    * to do any further processing.
@@ -1087,6 +1082,11 @@ void wxSocketImplUnix::Detected_Write()
   }
 }
 
   }
 }
 
+void wxSocketImplUnix::OnExceptionWaiting()
+{
+    wxFAIL_MSG( "not supposed to be called" );
+}
+
 /*
  * -------------------------------------------------------------------------
  * GAddress
 /*
  * -------------------------------------------------------------------------
  * GAddress
@@ -1686,4 +1686,5 @@ wxSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf)
   return wxSOCKET_NOERROR;
 }
 #endif  /* !defined(__VISAGECPP__) */
   return wxSOCKET_NOERROR;
 }
 #endif  /* !defined(__VISAGECPP__) */
+
 #endif  /* wxUSE_SOCKETS */
 #endif  /* wxUSE_SOCKETS */