⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userguide

📁 最经典的bittorrent协议的实现的源码
💻
📖 第 1 页 / 共 2 页
字号:
          become a background process.   ___________________________________  Options for Creating a New Torrent-t              Create a new torrent file.          Indicates that you want to create a new torrent.-s filename     Specify metainfo file name.          (Required) Give the name of the file to be created.-u url          Tracker's url.          (Required) Specify the tracker's announce URL. This usually          looks similar to "http://tracker.example.com:port/announce".-l piece_len    Piece length. (default 262144)          Specify the piece size for your torrent. This will also          determine the number of pieces in the torrent.     _________________________________________________________________   Examples   List the contents of a torrent:ctorrent -x example.torrent   Verify download completion status (takes a little time):ctorrent -c example.torrent   Download or seed a torrent using default options:ctorrent example.torrent   Download with a limit of 100KB/s, upload limit of 10KB/s, and seed          until a ratio of 1.5:1 is achieved:ctorrent -D 100 -U 10 -E 1.5 example.torrent   Create a torrent:ctorrent -t -u "http://tracker.example.com:6969/announce" -s example.torrent file_or_dir_to_upload     _________________________________________________________________   Runtime Commands Several commands are available during   upload/download; a list is available by pressing ? or h:Available commands: [Esc/0]  Operator menu                  m[+/-]   Adjust min peers count d[+/-]   Adjust download limit          M[+/-]   Adjust max peers count u[+/-]   Adjust upload limit            C[+/-]   Adjust max cache size n        Download specific file         S        Set/change CTCS server e[+/-]   Adjust seed exit time          v        Toggle verbose mode E[+/-]   Adjust seed exit ratio         Q        Quit X        Completion command   Command keys are case-sensitive. When a command key is pressed, a   prompt or current value is displayed. Prompts will suspend display of   the status line while waiting for input, though the client continues   to run normally. Toggle and numeric commands briefly suspend the   status line display.   Commands shown with [+/-] following the key are numeric options and   can be adjusted by pressing + or - repeatedly after the command key.   The increment is increased after five presses; to reset it, press the   command key again.   Most commands use the same letter as the corresponding command-line   option. Note that the bandwidth limit commands use the same letters   but opposite case.  Operator Menu   The 0 or Esc command key displays an operator menu with more advanced   (or less routine) options. All options on and beneath this menu   require pressing Enter to submit the input. Pressing Enter alone will   exit the menu.Operator Menu Output Channels:  1) Normal/status:  stdout  2) Interactive:    stdout  3) Error/warning:  stderr  4) Debug/verbose:  stderr  5) Input:          stdin Status Line Formats:  6) \ 0/6/18 [700/700/700] 0MB,11127MB | 0,15K/s | 0,0K E:0,405 *7) | S:0/10 L:6/7 C:0  R=15.92 D=0 U=16 K/s  seeding 48:57 Other options:  8) View detailed status  9) Pause (suspend upload/download) 10) Become daemon (fork to background)Enter selection:   The first set of options allow redirection of the client's various   types of console output (or even input--use carefully!). Of particular   use is the debug/verbose channel, which can be directed to a file to   create a debug log (be sure to also enable verbose output with the "v"   command key or CTCS).   The second set of options is used to select the status line format.   Since the actual client status is used to generate the menu options,   the operator menu display can also be used just to view the alternate   status information. An asterisk (*) indicates the currently selected   format.   The other options provide a means to view more detailed current status   or to pause uploading and downloading (more or less immediately,   unlike the previous CTCS pause function).   Note that there is no "recovery" from daemon mode. Use CTCS or screen   if you want the client to run in the background but need to manage or   monitor it.     _________________________________________________________________   Usage Notes  Bandwidth Limits   You should always specify an upload bandwidth limit. With the most   recent changes in the program, this "option" is not just a limit to   stay under, but an advisement to the client as well. Enhanced CTorrent   now tunes its upload performance based on the limit. Without a limit,   the client has no idea how much bandwidth your line can support and so   cannot perform this tuning. It is now possible to achieve better   upload rates with a limit than without. Due to the tit-for-tat nature   of bittorrent, this can also indirectly increase your download   performance. If you just want the client to use as much upload   bandwidth as possible, then choose a limit that is 10% or so less than   the available upload capacity of your line. ("Available" means not   typically in use by other applications.)   Note that limits are specified in KB/s (kilobytes per second), where   1KB = 1024 bytes (8192 bits). Your ISP likely measures in "kilobits"   (Kb, where 1Kb = 1000 bits or 125 bytes) or "megabits" (1Mb = 1000000   bits or 122KB). Some of that [to the tune of 20% in some cases] is   used by the line protocol and thus not available to you at all.  Startup   If you have previously started the torrent, CTorrent will perform a   hash-check of all pieces (or pieces indicated by the bitfield file if   present) while beginning the upload/download process. This does not   mean that it is starting over--quite the opposite! This is how the   client determines which pieces it already has so that they will not be   downloaded again (and can be offered for uploading). This process   confirms the pieces that you have even if the files have been altered   or recovered after a system crash.  Status Line   The status line that is output by the client has changed since the   original and deserves some explanation.    / 0/33/110 [672/672/672] 0MB,1130MB | 0,20K/s | 0,0K E:0,31 P:4/10    - - -- ---  --- --- ---  --- ------   - --      - -    - --   ----    A B  C  D    E   F   G    H     I     J  K      L M    N  O     P   A: Ticker; this character changes to indicate that the client is   running.   B: Number of seeders (complete peers) to which you are connected.   C: Number of leechers (incomplete peers) to which you are connected.   D: Total number of peers in the swarm, as last reported by the   tracker.   E: Number of pieces of the torrent that you have completed.   F: Total number of pieces in the torrent.   G: Number of pieces currently available from you and your connected   peers.   H: Total amount of data you have downloaded.   I: Total amount of data you have uploaded.   J: Your current download rate (20 second average).   K: Your current upload rate (20 second average).   L: Amount of data downloaded since the last status line update.   M: Amount of data uploaded since the last status line update.   N: Number of tracker connection errors.   O: Number of successful tracker connections.   P: Completion ratio of current fileset (when -n is used).   Additional information such as tracker connection status may be   displayed at the end of the status line when appropriate.  Alternate Status Line   A new status line format is also available via the operator menu.    / S:4/8 L:4/5 C:1  R=5.85 D=42 U=16 K/s  79/100% 49:47  P:40/100% 2:41    -   - -   - -   -    ----   --   --      -- ---- -----    ------- ----    A   B C   D E   F      G     H    I       J   K    L         M      N   A: Ticker; this character changes to indicate that the client is   running.   B: Number of seeders (complete peers) to which you are connected.   C: Number of seeders in the swarm (excluding yourself), as last   reported by the tracker.   D: Number of leechers (incomplete peers) to which you are connected.   E: Number of leechers in the swarm (excluding yourself), as last   reported by the tracker.   F: Number of peer connection attempts in progress.   G: Your upload/download ratio.   H: Your current download rate (20 second average).   I: Your current upload rate (20 second average).   J: Percent of the torrent that you have completed.   K: Percent of the torrent currently available from you and your   connected peers.       If you have the complete torrent, "seeding" is displayed instead   of these percentages.   L: Estimated download or seed time remaining, in hours and minutes.   M: Completion and availability of current fileset (when -n is used).   N: Time remaining to complete the current fileset (when -n is used).   Additional information such as tracker connection status may be   displayed at the end of the status line when appropriate.  Stopping CTorrent   Besides the Q command key (equivalent to Ctrl-C but a nicer user   interface), CTorrent can be stopped before completing download or   seeding by pressing Ctrl-C or sending the TERM signal ("kill pid").   This will tell the client to contact the tracker to send its final   statistics and advise that it is leaving the torrent. Note that this   could take a couple of minutes if the tracker is down or very busy.   (Only one attempt is made, so the client will exit even if the   connection fails.)   If Ctrl-C or kill is used a second time, the client closes all peer   connections and exits without waiting for the tracker connection. This   means that other peers may still attempt to contact you for a while,   and the tracker may not accept you back into the torrent until your   original session expires. (This could take up to a couple of hours,   depending on the tracker.)   In either case, this is a clean shutdown of CTorrent. All downloaded   data is written to disk before exiting. (Though only complete pieces   really count if the torrent is restarted, as there is no way to know   which blocks are missing from partial pieces.)     _________________________________________________________________References   1. http://www.rahul.net/dholmes/ctorrent/   2. http://en.wikipedia.org/wiki/BitTorrent   3. http://btfaq.com/   4. http://www.rahul.net/dholmes/ctorrent/userguide.html#opt_general   5. http://www.rahul.net/dholmes/ctorrent/userguide.html#opt_download   6. http://www.rahul.net/dholmes/ctorrent/userguide.html#opt_create   7. http://www.rahul.net/dholmes/ctorrent/userguide.html#examples   8. http://www.rahul.net/dholmes/ctorrent/userguide.html#commands   9. http://www.rahul.net/dholmes/ctorrent/userguide.html#opermenu  10. http://www.rahul.net/dholmes/ctorrent/userguide.html#bwlimits  11. http://www.rahul.net/dholmes/ctorrent/userguide.html#startup  12. http://www.rahul.net/dholmes/ctorrent/userguide.html#status  13. http://www.rahul.net/dholmes/ctorrent/userguide.html#stopping  14. http://www.rahul.net/dholmes/ctorrent/userguide.html#-a  15. http://www.rahul.net/dholmes/ctorrent/userguide.html#-A  16. http://www.rahul.net/dholmes/ctorrent/userguide.html#-b  17. http://www.rahul.net/dholmes/ctorrent/userguide.html#-c  18. http://www.rahul.net/dholmes/ctorrent/userguide.html#-C  19. http://www.rahul.net/dholmes/ctorrent/userguide.html#-d  20. http://www.rahul.net/dholmes/ctorrent/userguide.html#-D  21. http://www.rahul.net/dholmes/ctorrent/userguide.html#-e  22. http://www.rahul.net/dholmes/ctorrent/userguide.html#-E  23. http://www.rahul.net/dholmes/ctorrent/userguide.html#-f  24. http://www.rahul.net/dholmes/ctorrent/userguide.html#-i  25. http://www.rahul.net/dholmes/ctorrent/userguide.html#-l  26. http://www.rahul.net/dholmes/ctorrent/userguide.html#-m  27. http://www.rahul.net/dholmes/ctorrent/userguide.html#-M  28. http://www.rahul.net/dholmes/ctorrent/userguide.html#-n  29. http://www.rahul.net/dholmes/ctorrent/userguide.html#-p  30. http://www.rahul.net/dholmes/ctorrent/userguide.html#-P  31. http://www.rahul.net/dholmes/ctorrent/userguide.html#-s  32. http://www.rahul.net/dholmes/ctorrent/userguide.html#-s2  33. http://www.rahul.net/dholmes/ctorrent/userguide.html#-S  34. http://www.rahul.net/dholmes/ctorrent/userguide.html#-t  35. http://www.rahul.net/dholmes/ctorrent/userguide.html#-T  36. http://www.rahul.net/dholmes/ctorrent/userguide.html#-u  37. http://www.rahul.net/dholmes/ctorrent/userguide.html#-U  38. http://www.rahul.net/dholmes/ctorrent/userguide.html#-v  39. http://www.rahul.net/dholmes/ctorrent/userguide.html#-x  40. http://www.rahul.net/dholmes/ctorrent/userguide.html#-X  41. http://www.rahul.net/dholmes/ctorrent/userguide.html#-z

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -