哪位前辈熟悉Bit Torrent的Bencoding请进来,晚辈倾囊送分!UP有分!谢谢!

haoshenghan 2005-02-27 09:12:48
我是一个VC爱好者,最近在研究BitTorrent的相关技术,可是耗费了好大力气也找不到Completedir的VC实现,所以想自己写一个,可是我的英文水平确实有限,实在看不懂Bittorrent.com上的文档,尤其是下面两句:“pieces maps to a string whose length is a multiple of 20. It is to be subdivided into strings of length 20, each of which is the SHA1 hash of the piece at the corresponding index. ”还有“The 20 byte sha1 hash of the bencoded form of the info value from the metainfo file. Note that this is a substring of the metainfo file. This value will almost certainly have to be escaped. ”这两段,请前辈指教!来者有分!
...全文
174 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
haoshenghan 2005-03-01
  • 打赏
  • 举报
回复
算了,多谢各位老大,我自己写了一个
haoshenghan 2005-03-01
  • 打赏
  • 举报
回复
EnochShen(小疯子:真的好菜—知耻而后勇!)

文章说的却是解码,而非编码啊!!
haoshenghan 2005-03-01
  • 打赏
  • 举报
回复
super852(头太晕)

多谢,我看了BNBT,可是好像只有解码的部分,没有找到编码的部分啊??请前辈指教!
fisker0303 2005-02-28
  • 打赏
  • 举报
回复
关注.........
super852 2005-02-28
  • 打赏
  • 举报
回复
你看看Bittorrent的Treaker端程序,有C++的。里面有编码和解码部分,C++源代码。

那程序叫bnbt 去www.sourceforge.net搜一下即可找到。
EnochShen 2005-02-27
  • 打赏
  • 举报
回复
那个文章说得不是bencoding编码器?
haoshenghan 2005-02-27
  • 打赏
  • 举报
回复
多谢EnochShen(小疯子:真的好菜—知耻而后勇!) ,晚辈愚钝,请教bencoding编码器,谢谢!
wangxp_bbi 2005-02-27
  • 打赏
  • 举报
回复
up
EnochShen 2005-02-27
  • 打赏
  • 举报
回复
bencoding编码解析器 http://dev.csdn.net/article/60/article/59/59486.shtm
haoshenghan 2005-02-27
  • 打赏
  • 举报
回复
主要就是看不懂SHA1和“20 byte”的关系,我的理解如下:文档是指按一定大小把文件分块后,每一块算出一个长度为“20 byte”SHA1值然后按顺序相加吗?

18,356

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 网络编程
c++c语言开发语言 技术论坛(原bbs)
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧