kadfile.h
来自「Kademlia---第第3代P2P原代码」· C头文件 代码 · 共 37 行
H
37 行
#pragma once
#include "stdafx.h"
#include "../utils/UInt128.h"
#include <vector>
namespace Kademlia {
struct CKadFile{
CUInt128 hash;
CString name;
uint32 size;
int type;
uint32 tth[2];
CKadFile(const CKadFile& file)
{
hash = file.hash;
name = file.name;
size = file.size;
type = file.type;
tth[0] = file.tth[0];
tth[1] = file.tth[1];
}
CKadFile(const byte* _hash, const char* _name = "", uint32 _size = 0, byte _type = 0) :
hash(_hash), name(_name), size(_size), type(_type)
{
memcpy(tth, _hash + 16, sizeof(tth));
}
};
typedef std::vector<CKadFile> FileList;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?