// Wait in an active polling loop.
//
// NOTE: We duplicate some of the code in OnRequest, but this doesn't
// Wait in an active polling loop.
//
// NOTE: We duplicate some of the code in OnRequest, but this doesn't
// This is used to avoid a busy loop on wxBase - having a select
// timeout of 50 ms per iteration should be enough.
if (timeout > 50)
m_socket->SetTimeout(50);
else
m_socket->SetTimeout(timeout);
// This is used to avoid a busy loop on wxBase - having a select
// timeout of 50 ms per iteration should be enough.
if (timeout > 50)
m_socket->SetTimeout(50);
else
m_socket->SetTimeout(timeout);
// If there's less than 50 ms left, just call select with that timeout.
if (time_left < 50)
m_socket->SetTimeout(time_left);
// If there's less than 50 ms left, just call select with that timeout.
if (time_left < 50)
m_socket->SetTimeout(time_left);