added wxSocket::ShutdownOutput() (closes #9229)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -323,9 +323,7 @@ All:
|
|||||||
- Added wxString::Capitalize() and MakeCapitalized().
|
- Added wxString::Capitalize() and MakeCapitalized().
|
||||||
- Added wxArray::swap().
|
- Added wxArray::swap().
|
||||||
- Added wxSHUTDOWN_LOGOFF and wxSHUTDOWN_FORCE wxShutdown() flags (troelsk).
|
- Added wxSHUTDOWN_LOGOFF and wxSHUTDOWN_FORCE wxShutdown() flags (troelsk).
|
||||||
- Added wxArtProvider::GetNativeSizeHint(); GetSizeHint() as well as
|
- Added wxSocket::ShutdownOutput().
|
||||||
GetNativeSizeHint() now return more sensible values in wxMSW and wxMac and
|
|
||||||
no longer return bogus values.
|
|
||||||
|
|
||||||
All (Unix):
|
All (Unix):
|
||||||
|
|
||||||
@@ -431,6 +429,9 @@ All (GUI):
|
|||||||
- Add wxEVT_GRID_CELL_CHANGING event matching wxEVT_GRID_CELL_CHANGED.
|
- Add wxEVT_GRID_CELL_CHANGING event matching wxEVT_GRID_CELL_CHANGED.
|
||||||
- Get/HasModifiers() of wxKeyEvent are now also available in wxMouseEvent.
|
- Get/HasModifiers() of wxKeyEvent are now also available in wxMouseEvent.
|
||||||
- Provide new/old cell value in wxEVT_GRID_CELL_CHANGING/CHANGED events.
|
- 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:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -132,6 +132,7 @@ public:
|
|||||||
|
|
||||||
// base IO
|
// base IO
|
||||||
virtual bool Close();
|
virtual bool Close();
|
||||||
|
void ShutdownOutput();
|
||||||
wxSocketBase& Discard();
|
wxSocketBase& Discard();
|
||||||
wxSocketBase& Peek(void* buffer, wxUint32 nbytes);
|
wxSocketBase& Peek(void* buffer, wxUint32 nbytes);
|
||||||
wxSocketBase& Read(void* buffer, wxUint32 nbytes);
|
wxSocketBase& Read(void* buffer, wxUint32 nbytes);
|
||||||
|
@@ -819,6 +819,15 @@ public:
|
|||||||
*/
|
*/
|
||||||
void Close();
|
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
|
This function simply deletes all bytes in the incoming queue. This function
|
||||||
always returns immediately and its operation is not affected by IO flags.
|
always returns immediately and its operation is not affected by IO flags.
|
||||||
|
@@ -770,14 +770,19 @@ bool wxSocketBase::Close()
|
|||||||
// Interrupt pending waits
|
// Interrupt pending waits
|
||||||
InterruptWait();
|
InterruptWait();
|
||||||
|
|
||||||
if (m_impl)
|
ShutdownOutput();
|
||||||
m_impl->Shutdown();
|
|
||||||
|
|
||||||
m_connected = false;
|
m_connected = false;
|
||||||
m_establishing = false;
|
m_establishing = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxSocketBase::ShutdownOutput()
|
||||||
|
{
|
||||||
|
if ( m_impl )
|
||||||
|
m_impl->Shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
wxSocketBase& wxSocketBase::Read(void* buffer, wxUint32 nbytes)
|
wxSocketBase& wxSocketBase::Read(void* buffer, wxUint32 nbytes)
|
||||||
{
|
{
|
||||||
// Mask read events
|
// Mask read events
|
||||||
|
Reference in New Issue
Block a user