remove the badle defined and apparently unnecessary wxSocketImpl::m_detected field

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-12-27 21:48:42 +00:00
parent 51566e1f98
commit 5e9238f9c6
5 changed files with 109 additions and 174 deletions

View File

@@ -513,9 +513,8 @@ int wxSocketImplUnix::Read(void *buffer, int size)
*/
if ((ret == 0) && m_stream)
{
/* Make sure wxSOCKET_LOST event gets sent and shut down the socket */
m_detected = wxSOCKET_LOST_FLAG;
OnReadWaiting();
m_establishing = false;
OnStateChange(wxSOCKET_LOST);
return 0;
}
else if (ret == -1)
@@ -576,13 +575,11 @@ int wxSocketImplUnix::Write(const void *buffer, int size)
void wxSocketImplUnix::EnableEvent(wxSocketNotify event)
{
m_detected &= ~(1 << event);
wxSocketManager::Get()->Install_Callback(this, event);
}
void wxSocketImplUnix::DisableEvent(wxSocketNotify event)
{
m_detected |= (1 << event);
wxSocketManager::Get()->Uninstall_Callback(this, event);
}
@@ -709,17 +706,6 @@ void wxSocketImplUnix::OnReadWaiting()
return;
}
/* If we have already detected a LOST event, then don't try
* to do any further processing.
*/
if ((m_detected & wxSOCKET_LOST_FLAG) != 0)
{
m_establishing = false;
OnStateChange(wxSOCKET_LOST);
return;
}
int num = recv(m_fd, &c, 1, MSG_PEEK | GSOCKET_MSG_NOSIGNAL);
if (num > 0)
@@ -762,17 +748,6 @@ void wxSocketImplUnix::OnReadWaiting()
void wxSocketImplUnix::OnWriteWaiting()
{
/* If we have already detected a LOST event, then don't try
* to do any further processing.
*/
if ((m_detected & wxSOCKET_LOST_FLAG) != 0)
{
m_establishing = false;
OnStateChange(wxSOCKET_LOST);
return;
}
if (m_establishing && !m_server)
{
int error;