X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/22b6de6a70900550b5411f14fffc9d48adbbf222..888dde65f43d5f57e8fb2028b27191cca1741403:/src/common/socket.cpp diff --git a/src/common/socket.cpp b/src/common/socket.cpp index c5b4ce938c..203d79a063 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 ); } // -------------------------------------------------------------------------- @@ -1307,12 +1303,13 @@ bool wxSocketClient::DoConnect(wxSockAddress& addr_man, wxSockAddress* local, bo m_socket->SetLocal(la); } +#if defined(__WXMSW__) || defined(__WXGTK__) + m_socket->SetInitialSocketBuffers(m_initialRecvBufferSize, m_initialSendBufferSize); +#endif + 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 +1365,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)