]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxSocket::ShutdownOutput() (closes #9229)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 30 Dec 2008 11:27:41 +0000 (11:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 30 Dec 2008 11:27:41 +0000 (11:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
include/wx/socket.h
interface/wx/socket.h
src/common/socket.cpp

index ee21e98b063cd8b4678a5182e1c5cc4ee1ce3443..680a4bdbb8ccf0c9234949dc175afa848e689628 100644 (file)
@@ -323,9 +323,7 @@ All:
 - Added wxString::Capitalize() and MakeCapitalized().
 - Added wxArray::swap().
 - Added wxSHUTDOWN_LOGOFF and wxSHUTDOWN_FORCE wxShutdown() flags (troelsk).
-- Added wxArtProvider::GetNativeSizeHint(); GetSizeHint() as well as
-  GetNativeSizeHint() now return more sensible values in wxMSW and wxMac and
-  no longer return bogus values.
+- Added wxSocket::ShutdownOutput().
 
 All (Unix):
 
@@ -431,6 +429,9 @@ All (GUI):
 - Add wxEVT_GRID_CELL_CHANGING event matching wxEVT_GRID_CELL_CHANGED.
 - Get/HasModifiers() of wxKeyEvent are now also available in wxMouseEvent.
 - Provide new/old cell value in wxEVT_GRID_CELL_CHANGING/CHANGED events.
+- Added wxArtProvider::GetNativeSizeHint(); GetSizeHint() as well as
+  GetNativeSizeHint() now return more sensible values in wxMSW and wxMac and
+  no longer return bogus values.
 
 wxGTK:
 
index 88291e6ac2c0fd06ebb026d5567035b478c88127..2ce26e53456cb4e03e87f0fe4aa2f0a81828ec6e 100644 (file)
@@ -132,6 +132,7 @@ public:
 
   // base IO
   virtual bool  Close();
+  void ShutdownOutput();
   wxSocketBase& Discard();
   wxSocketBase& Peek(void* buffer, wxUint32 nbytes);
   wxSocketBase& Read(void* buffer, wxUint32 nbytes);
index 621df49adf382cb9daa6ed0befe31ff4c45c0558..d6cd5ccce9c1793d71914063c21ee179586b71a9 100644 (file)
@@ -819,6 +819,15 @@ public:
     */
     void Close();
 
+    /**
+        Shuts down the writing end of the socket.
+
+        This function simply calls the standard shutdown() function on the
+        underlying socket, indicating that nothing will be written to this
+        socket any more.
+     */
+    void ShutdownOutput();
+
     /**
         This function simply deletes all bytes in the incoming queue. This function
         always returns immediately and its operation is not affected by IO flags.
index ba15840b28c2931ed99411c177a80deeb705f722..f03558c0b76bebe87371b32cdd22d5ce97420533 100644 (file)
@@ -770,14 +770,19 @@ bool wxSocketBase::Close()
     // Interrupt pending waits
     InterruptWait();
 
-    if (m_impl)
-        m_impl->Shutdown();
+    ShutdownOutput();
 
     m_connected = false;
     m_establishing = false;
     return true;
 }
 
+void wxSocketBase::ShutdownOutput()
+{
+    if ( m_impl )
+        m_impl->Shutdown();
+}
+
 wxSocketBase& wxSocketBase::Read(void* buffer, wxUint32 nbytes)
 {
     // Mask read events