本文整理汇总了C++中CUInt128::ToHexString方法的典型用法代码示例。如果您正苦于以下问题:C++ CUInt128::ToHexString方法的具体用法?C++ CUInt128::ToHexString怎么用?C++ CUInt128::ToHexString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUInt128
的用法示例。
在下文中一共展示了CUInt128::ToHexString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FindNodeSpecial
bool CSearchManager::FindNodeSpecial(const CUInt128& id, CKadClientSearcher *requester)
{
// Do a node lookup.
AddDebugLogLineN(logKadSearch, wxT("Starting NODESPECIAL Kad Search for ") + id.ToHexString());
CSearch *search = new CSearch;
search->SetSearchTypes(CSearch::NODESPECIAL);
search->SetTargetID(id);
search->SetNodeSpecialSearchRequester(requester);
return StartSearch(search);
}
示例2: FindNodeSpecial
bool CSearchManager::FindNodeSpecial(const CUInt128 &uID, CKadClientSearcher* pRequester){
// Do a node lookup.
CString strDbgID;
uID.ToHexString(&strDbgID);
DebugLog(_T("Starting NODESPECIAL Kad Search for %s"), strDbgID);
CSearch *pSearch = new CSearch;
pSearch->m_uType = CSearch::NODESPECIAL;
pSearch->m_uTarget = uID;
pSearch->SetNodeSpecialSearchRequester(pRequester);
return StartSearch(pSearch);
}
示例3:
// Needed for ASSERT_EQUALS with CUInt128
template<> wxString StringFrom<CUInt128>(const CUInt128& value) {
return value.ToHexString();
}
示例4: OnSmallTimer
void CRoutingZone::OnSmallTimer()
{
if (!IsLeaf())
return;
CContact *pContact = NULL;
time_t tNow = time(NULL);
ContactList listEntries;
// Remove dead entries
m_pBin->GetEntries(&listEntries);
for (ContactList::iterator itContactList = listEntries.begin(); itContactList != listEntries.end(); ++itContactList)
{
pContact = *itContactList;
if ( pContact->GetType() == 4)
{
if (((pContact->m_tExpires > 0) && (pContact->m_tExpires <= tNow)))
{
if(!pContact->InUse())
{
//-----------------------------------------------------------------
CString strID;
CUInt128 uId = pContact->GetClientID();
uId.ToHexString(&strID);
CString strIP;
pContact->GetIPAddress(&strIP);
TRACE(_T("DelContact id=%s ip=%s %u %u %u\n"),
strID, strIP, pContact->GetTCPPort(), pContact->GetUDPPort(),
CKademlia::GetRoutingZone()->GetNumContacts());
//-----------------------------------------------------------------
m_pBin->RemoveContact(pContact);
delete pContact;
}
continue;
}
}
if(pContact->m_tExpires == 0)
pContact->m_tExpires = tNow;
}
pContact = m_pBin->GetOldest();
if( pContact != NULL )
{
if ( pContact->m_tExpires >= tNow || pContact->GetType() == 4)
{
m_pBin->RemoveContact(pContact);
m_pBin->m_listEntries.push_back(pContact);
pContact = NULL;
}
}
if(pContact != NULL)
{
pContact->CheckingType();
if (pContact->GetVersion() >= 2/*47a*/)
{
//--->xt if (thePrefs.GetDebugClientKadUDPLevel() > 0)
//DebugSend("KADEMLIA2_HELLO_REQ", pContact->GetIPAddress(), pContact->GetUDPPort());
CKademlia::GetUDPListener()->SendMyDetails(KADEMLIA2_HELLO_REQ, pContact->GetIPAddress(), pContact->GetUDPPort(), true);
}
else
{
//--->xt if (thePrefs.GetDebugClientKadUDPLevel() > 0)
//DebugSend("KADEMLIA_HELLO_REQ", pContact->GetIPAddress(), pContact->GetUDPPort());
CKademlia::GetUDPListener()->SendMyDetails(KADEMLIA_HELLO_REQ, pContact->GetIPAddress(), pContact->GetUDPPort(), false);
if (pContact->CheckIfKad2())
{
//--->xt if (thePrefs.GetDebugClientKadUDPLevel() > 0)
//DebugSend("KADEMLIA2_HELLO_REQ", pContact->GetIPAddress(), pContact->GetUDPPort());
CKademlia::GetUDPListener()->SendMyDetails(KADEMLIA2_HELLO_REQ, pContact->GetIPAddress(), pContact->GetUDPPort(), true);
}
}
}
}