コード例 #1
0
ファイル: WebModules.cpp プロジェクト: Affix/znc
bool CWebSock::OnLogin(const CString& sUser, const CString& sPass) {
	DEBUG("=================== CWebSock::OnLogin()");
	m_spAuth = new CWebAuth(this, sUser, sPass);

	// Some authentication module could need some time, block this socket
	// until then. CWebAuth will UnPauseRead().
	PauseRead();
	CZNC::Get().AuthUser(m_spAuth);

	// If CWebAuth already set this, don't change it.
	return IsLoggedIn();
}
コード例 #2
0
ファイル: bouncedcc.cpp プロジェクト: sorbits/znc
void CDCCBounce::ReadData(const char* data, size_t len) {
    if (m_pPeer) {
        m_pPeer->Write(data, len);

        size_t BufLen = m_pPeer->GetInternalWriteBuffer().length();

        if (BufLen >= m_uiMaxDCCBuffer) {
            DEBUG(GetSockName() << " The send buffer is over the "
                  "limit (" << BufLen <<"), throttling");
            PauseRead();
        }
    }
}