家电维修班,手机维修班,电脑维修班,电工班,焊工班,液晶电视维修班,电动工具维修班、电动车摩托车维修班、网络营销培训、网站设计培训、淘宝培训---全国招生 家电维修班,手机维修班,电脑维修班,电工班,焊工班,液晶电视维修班,电动工具维修班、电动车摩托车维修班、网络营销培训、网站设计培训、淘宝培训---全国招生
湖南阳光电子电脑技术学校_面向全国招生! 咨询电话:0731-85579057,0731-85569651. 全国免费电话:0731-85579057
当前位置:电脑硬件维修培训网文章资讯网络技术

BitTorrent协议详解

作者:佚名  来源:本站整理  发布时间:2012-01-10-20:05:14

BitTorrent is a protocol for distributing files. It identifies content by URL and is designed to integrate seamlessly with the web. Its advantage over plain HTTP is that when multiple downloads of the same file happen concurrently, the downloaders upload to each other, making it possible for the file source to support very large numbers of downloaders with only a modest increase in its load.

A BitTorrent file distribution consists of these entities:

  • An ordinary web server
  • A static 'metainfo' file
  • A BitTorrent tracker
  • An 'original' downloader
  • The end user web browsers
  • The end user downloaders

There are ideally many end users for a single file.

To start serving, a host goes through the following steps:

  1. Start running a tracker (or, more likely, have one running already).
  2. Start running an ordinary web server, such as apache, or have one already.
  3. Associate the extension .torrent with mimetype application/x-bittorrent on their web server (or have done so already).
  4. Generate a metainfo (.torrent) file using the complete file to be served and the URL of the tracker.
  5. Put the metainfo file on the web server.
  6. Link to the metainfo (.torrent) file from some other web page.
  7. Start a downloader which already has the complete file (the 'origin').

To start downloading, a user does the following:

  1. Install BitTorrent (or have done so already).
  2. Surf the web.
  3. Click on a link to a .torrent file.
  4. Select where to save the file locally, or select a partial download to resume.
  5. Wait for download to complete.
  6. Tell downloader to exit (it keeps uploading until this happens).

The connectivity is as follows:

  • The web site is serving up static files as normal, but kicking off the BitTorrent helper app on the clients.
  • The tracker is receiving information from all downloaders and giving them random lists of peers. This is done over HTTP or HTTPS.
  • Downloaders are periodically checking in with the tracker to keep it informed of their progress, and are uploading to and downloading from each other via direct connections. These connections use the BitTorrent peer protocol, which operates over TCP.
  • The origin is uploading but not downloading at all, since it has the entire file. The origin is necessary to get the entire file into the network. Often for popular downloads the origin can be taken down after a while since several downloads may have completed and been left running indefinitely.

Metainfo file and tracker responses are both sent in a simple, efficient, and extensible format called bencoding (pronounced 'bee encoding'). Bencoded messages are nested dictionaries and lists (as in Python), which can contain strings and integers. Extensibility is supported by ignoring unexpected dictionary keys, so additional optional ones can be added later.

本消息共4页,当前在第1页  1  2  3  4  

精品课程推荐

学生真情感言

关于本站 | 网站帮助 | 管理网站 | | 友情连接 | 百度收录
报名电话:0731-85579057,0731-85569651, 咨询QQ:361928696,873219118,250539810.
校址:湖南省长沙市雨花区车站南路红花坡路口(红花坡路176号)“智慧桥幼儿园”旁边 | 来校路线:长沙火车站售票处后坪乘135路至"鼓风站"下车,回走100米即到.
电工培训学校 电动车维修学校 摩托车维修学校 摩托车维修培训 手机维修培训 家电维修培训 电脑维修培训 电动工具维修培训 液晶电视维修培训 安防监控培训 空调维修培训 网络营销培训 网站设计培训 淘宝网店培训 电器维修培训 家电维修学校 电工培训 焊工培训 电工学校
点击这里给我发消息
点击这里给我发消息
点击这里给我发消息
阳光电子电脑学校