void CGameNet::_recvProc() { char tmpBuff[65535]; int len; while (mRecvThRunnable) { bool ret; len = 0; ret = mNetSocket->_Recv(tmpBuff, &len); if (ret == 0) { NotifyDisconnected(); continue; } else { if (len > 0) { mRecvMtx.lock(); mRecvBuff->Recv(tmpBuff, len); mRecvMtx.unlock(); } else { Sleep(100); } } } }
void CGameNet::_sendProc() { char tmpBuff[65535]; uint32 len; while (mSendThRunnable) { if (mSendBuff->HasOpData()) { len = 0; mSendMtx.lock(); //read buff data mSendBuff->Read(tmpBuff, &len); mSendMtx.unlock(); if (len > 0) { int ret = mNetSocket->_Send(tmpBuff, len); if (!ret) { NotifyDisconnected(); continue; } } } else { Sleep(100); } } }
TabContents::~TabContents() { is_being_destroyed_ = true; NotifyDisconnected(); // OnCloseStarted isn't called in unit tests. if(!tab_close_start_time_.is_null()) { UMA_HISTOGRAM_TIMES("Tab.Close", base::TimeTicks::Now() - tab_close_start_time_); } //FOR_EACH_OBSERVER(TabContentsObserver, observers_, TabContentsDestroyed()); set_delegate(NULL); }
void InstSocket::onDisconnected() { emit NotifyDisconnected(); }
void Instrument::onDisconnected() { emit NotifyDisconnected(); }