Esempio n. 1
0
static void PingServers(void)
{
    netadr_t broadcast;

    S_StopAllSounds();

    ClearServers();
    UpdateStatus();

    // update status string now, because fetching and
    // resolving will take some time
    m_servers.status_c = "Resolving servers, please wait...";
    SCR_UpdateScreen();

    // fetch and resolve servers
    memset(&broadcast, 0, sizeof(broadcast));
    ParseMasterArgs(&broadcast);

    m_servers.timestamp = Sys_Milliseconds();

    // optionally ping broadcast
    if (broadcast.type)
        CL_SendStatusRequest(&broadcast);

    if (!m_servers.list.numItems) {
        FinishPingStage();
        return;
    }

    // begin pinging servers
    m_servers.pingstage = PING_STAGES;
    m_servers.pingindex = 0;
    m_servers.pingextra = 0;
    CalcPingRate();
}
Esempio n. 2
0
static void Pop(menuFrameWork_t *self)
{
    ClearServers();
    if (m_servers.args) {
        Z_Free(m_servers.args);
        m_servers.args = NULL;
    }
}
Esempio n. 3
0
MemCacheClient & 
MemCacheClient::operator=(
    const MemCacheClient & rhs
    )
{
    m_nTimeoutMs = rhs.m_nTimeoutMs;
    ClearServers();
    m_rgpServer.resize(rhs.m_rgpServer.size());
    for (size_t n = 0; n < rhs.m_rgpServer.size(); ++n) {
        m_rgpServer[n] = new Server(*rhs.m_rgpServer[n]);
        if (!m_rgpServer[n]) throw std::bad_alloc();
    }
    return *this;
}
Esempio n. 4
0
MemCacheClient::~MemCacheClient()
{
    ClearServers();
}