本文整理汇总了C++中CAddrInfo::IsI2P方法的典型用法代码示例。如果您正苦于以下问题:C++ CAddrInfo::IsI2P方法的具体用法?C++ CAddrInfo::IsI2P怎么用?C++ CAddrInfo::IsI2P使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAddrInfo
的用法示例。
在下文中一共展示了CAddrInfo::IsI2P方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LogPrint
void CAddrMan::CheckAndDeleteB32Hash( const int nID, const CAddrInfo& aTerrible )
{
if( aTerrible.IsI2P() ) {
uint256 b32hash = GetI2pDestinationHash( aTerrible.GetI2pDestination() );
if( mapI2pHashes.count( b32hash ) == 1 ) {
int nID2 = mapI2pHashes[ b32hash ];
if( nID == nID2 ) // Yap this is the one they want to delete, and it exists
mapI2pHashes.erase( b32hash );
else {
LogPrint( "addrman", "While attempting to erase base32 hash %s, it was unexpected that the ids differ id1=%d != id2=%d\n", b32hash.GetHex(), nID, nID2 );
// CAddrInfo& info2 = mapInfo[nID2];
// aTerrible.print();
// info2.print();
}
}
else {
LogPrint( "addrman", "While attempting to remove base32 hash %s, it was found to not exist.\n", b32hash.GetHex() );
// aTerrible.print();
}
}
}
示例2: CAddrInfo
/** \brief Simply looks up the hash, if the id is found returns a pointer to the
CAddrInfo(CAddress(CService(CNetAddr()))) class object where the base64 string is stored
*
* \param sB32addr const string&
* \return string, null if not found or the Base64 destination string of give b32.i2p address
*
*/
std::string CAddrMan::GetI2pBase64Destination(const std::string& sB32addr)
{
CAddrInfo* paddr = LookupB32addr(sB32addr);
return paddr && paddr->IsI2P() ? paddr->GetI2pDestination() : std::string();
}