X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/22b6de6a70900550b5411f14fffc9d48adbbf222..1b5dbd344a28a2a8e1318ef068fc8ce324422053:/src/common/socket.cpp?ds=sidebyside diff --git a/src/common/socket.cpp b/src/common/socket.cpp index c5b4ce938c..e90a3b7cb5 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -1009,8 +1009,6 @@ void wxSocketBase::OnRequest(wxSocketNotify notification) void wxSocketBase::Notify(bool notify) { m_notify = notify; - if ( m_socket ) - m_socket->Notify(notify); } void wxSocketBase::SetNotify(wxSocketEventFlags flags) @@ -1098,8 +1096,8 @@ wxSocketServer::wxSocketServer(const wxSockAddress& addr_man, return; } - // Setup the socket as server - m_socket->Notify(m_notify); + // Setup the socket as server + m_socket->SetLocal(addr_man.GetAddress()); if (GetFlags() & wxSOCKET_REUSEADDR) { @@ -1125,8 +1123,6 @@ wxSocketServer::wxSocketServer(const wxSockAddress& addr_man, m_socket->SetCallback(GSOCK_INPUT_FLAG | GSOCK_OUTPUT_FLAG | GSOCK_LOST_FLAG | GSOCK_CONNECTION_FLAG, wx_socket_callback, (char *)this); - - wxLogTrace( wxTRACE_Socket, _T("wxSocketServer on fd %d"), m_socket->m_fd ); } // -------------------------------------------------------------------------- @@ -1310,9 +1306,6 @@ bool wxSocketClient::DoConnect(wxSockAddress& addr_man, wxSockAddress* local, bo m_socket->SetPeer(addr_man.GetAddress()); err = m_socket->Connect(GSOCK_STREAMED); - // register for callbacks (call it after m_socket->m_fd was initialized) - m_socket->Notify(m_notify); - if (!wait) m_socket->SetNonBlocking(0); @@ -1368,7 +1361,6 @@ wxDatagramSocket::wxDatagramSocket( const wxSockAddress& addr, wxFAIL_MSG( _T("datagram socket not new'd") ); return; } - m_socket->Notify(m_notify); // Setup the socket as non connection oriented m_socket->SetLocal(addr.GetAddress()); if (flags & wxSOCKET_REUSEADDR)