wxSocketImpl::Shutdown() doesn't need to be virtual, its implementation can the same in Unix and Win32 versions (events are already disabled by Close() so there is no need to do it again explicitly under Unix)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-12-27 22:03:34 +00:00
parent 7d66cdccd0
commit 62088a3c3b
3 changed files with 13 additions and 15 deletions

View File

@@ -174,6 +174,10 @@ int _System soclose(int);
# define GSOCKET_MSG_NOSIGNAL 0
#endif /* MSG_NOSIGNAL */
// ----------------------------------------------------------------------------
// implementation of thread-safe/reentrant functions if they're missing
// ----------------------------------------------------------------------------
#if wxUSE_THREADS && (defined(HAVE_GETHOSTBYNAME) || defined(HAVE_GETSERVBYNAME))
# include "wx/thread.h"
#endif
@@ -424,6 +428,10 @@ struct servent *wxGetservbyname_r(const char *port, const char *protocol,
return se;
}
// ============================================================================
// wxSocketImpl implementation
// ============================================================================
/* static */
wxSocketImpl *wxSocketImpl::Create(wxSocketBase& wxsocket)
{
@@ -431,18 +439,6 @@ wxSocketImpl *wxSocketImpl::Create(wxSocketBase& wxsocket)
}
/*
* Disallow further read/write operations on this socket, close
* the fd and disable all callbacks.
*/
void wxSocketImplUnix::Shutdown()
{
/* Don't allow events to fire after socket has been closed */
DisableEvents();
wxSocketImpl::Shutdown();
}
wxSocketError wxSocketImplUnix::GetLastError() const
{
switch ( errno )