git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57611
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// it was indeed created
void Close();
// it was indeed created
void Close();
- virtual void Shutdown();
+ // shuts down the writing end of the socket and closes it, this is a more
+ // graceful way to close
+ //
+ // does nothing if the socket wasn't created
+ void Shutdown();
virtual wxSocketError GetLastError() const;
virtual wxSocketError GetLastError() const;
- virtual void Shutdown();
-
virtual int Read(void *buffer, int size);
virtual int Write(const void *buffer, int size);
virtual int Read(void *buffer, int size);
virtual int Write(const void *buffer, int size);
# define GSOCKET_MSG_NOSIGNAL 0
#endif /* MSG_NOSIGNAL */
# 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
#if wxUSE_THREADS && (defined(HAVE_GETHOSTBYNAME) || defined(HAVE_GETSERVBYNAME))
# include "wx/thread.h"
#endif
+// ============================================================================
+// wxSocketImpl implementation
+// ============================================================================
+
/* static */
wxSocketImpl *wxSocketImpl::Create(wxSocketBase& wxsocket)
{
/* static */
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 )
wxSocketError wxSocketImplUnix::GetLastError() const
{
switch ( errno )