connection::connection() :m_bufferOffset(0) { m_pingTimer = new QTimer(this); m_pingTimer->setInterval(PING_TIMEOUT * 1000); connect(m_pingTimer, SIGNAL(timeout()), this, SLOT(checkPingTimeout())); }
void MsgChannel::eventTimer(int id, void* param) { //PWSHOWMETHOD(); if ( not isConnSuccess() ) return; if ( isInstDeleteOrExpired() ) return; if ( id == TIMER_CHECK_10SEC ) { if ( not checkPingTimeout() ) eventPingTimeout(); } }