/[mldonkey]/mldonkey/src/networks/bittorrent/bTOptions.ml
ViewVC logotype

Diff of /mldonkey/src/networks/bittorrent/bTOptions.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by spiralvoice, Tue May 17 13:18:05 2005 UTC revision 1.17 by spiralvoice, Sun Jul 10 23:19:16 2005 UTC
# Line 24  open Options Line 24  open Options
24    
25  let bittorrent_ini = create_options_file "bittorrent.ini"  let bittorrent_ini = create_options_file "bittorrent.ini"
26  let bittorrent_section = file_section bittorrent_ini ["Bittorrent"] "Bittorrent options"  let bittorrent_section = file_section bittorrent_ini ["Bittorrent"] "Bittorrent options"
27      
28  let client_port = define_option bittorrent_section ["client_port"]  let client_port = define_option bittorrent_section ["client_port"]
29      "The port to bind the client to"      "The port to bind the client to"
30      int_option 6882      int_option 6882
31      
     
32  let client_uid = define_option bittorrent_section ["client_uid"]  let client_uid = define_option bittorrent_section ["client_uid"]
33      "The UID of this client" Sha1.option (Sha1.random ())      "The UID of this client" Sha1.option (Sha1.random ())
34    
     
35  let shortname o =  let shortname o =
36    Printf.sprintf "BT-%s" (shortname o)    Printf.sprintf "BT-%s" (shortname o)
37      
38  let gui_bittorrent_options_panel =  let gui_bittorrent_options_panel =
   (*  
   define_option bittorrent_section ["gui_bittorrent_options_panel"]  
     "Which options are configurable in the GUI option panel, and in the  
   bittorrent section. Last entry indicates the kind of widget used (B=Boolean,T=Text)"  
 (list_option (tuple3_option (string_option, string_option, string_option)))  
 *)  
     
39    [    [
40      "Port", shortname client_port, "T";      "Port", shortname client_port, "T";
41    ]    ]
42    
     
       
 (*  
 let torrent_files =  
   define_option bittorrent_section ["torrent_files"]  
   "The torrent files to serve on the tracker WEB server"  
     (list_option (tuple2_option (string_option, filename_option))) []  
       
 let tracked_files =  
   define_option bittorrent_section ["tracked_files"]  
   "The files tarcked on this tracker"  
     (list_option filename_option) []  
   
 let shared_files =  
   define_option bittorrent_section ["shared_files"]  
   "The files shared on this torrent server (pair .torrent file, and path to shared file or directory)"  
     (list_option (tuple2_option (filename_option, filename_option))) []  
 *)    
       
43  let ask_tracker_threshold = define_option bittorrent_section ["ask_tracker_threshold"]  let ask_tracker_threshold = define_option bittorrent_section ["ask_tracker_threshold"]
44      "Ask the tracker for new sources only if you have fewer than that number of sources"      "Ask the tracker for new sources only if you have fewer than that number of sources"
45      int_option 20      int_option 20
# Line 80  let max_bt_uploaders = define_option bit Line 52  let max_bt_uploaders = define_option bit
52      "Maximum number of uploaders for bittorrent"      "Maximum number of uploaders for bittorrent"
53      int_option 5      int_option 5
54    
55  (* numwant: Optional. Number of peers that the client would like to receive from the tracker.  (* numwant: Optional. Number of peers that the client would like to receive from the tracker.
56  This value is permitted to be zero. If omitted, typically defaults to 50 peers.   *)  This value is permitted to be zero. If omitted, typically defaults to 50 peers.   *)
57    
58  let numwant = define_option bittorrent_section ["numwant"]  let numwant = define_option bittorrent_section ["numwant"]
# Line 100  let _ = Line 72  let _ =
72        (fun _ ->        (fun _ ->
73          if !!max_bt_uploaders < 0 then max_bt_uploaders =:= 5)          if !!max_bt_uploaders < 0 then max_bt_uploaders =:= 5)
74    end    end
75      
     
76  let cookies = define_option bittorrent_section ["cookies"]  let cookies = define_option bittorrent_section ["cookies"]
77      "Cookies send with http request to get .torrent file"      "Cookies send with http request to get .torrent file"
78      (list_option (tuple2_option (string_option, list_option (tuple2_option (string_option, string_option))))) []      (list_option (tuple2_option (string_option, list_option (tuple2_option (string_option, string_option))))) []
# Line 109  let cookies = define_option bittorrent_s Line 80  let cookies = define_option bittorrent_s
80  let referers = define_option bittorrent_section ["referers"]  let referers = define_option bittorrent_section ["referers"]
81      "Referer sent with http request to get .torrent file"      "Referer sent with http request to get .torrent file"
82      (list_option (tuple2_option (string_option, string_option))) [(".*suprnova.*", "http://www.suprnova.org/")]      (list_option (tuple2_option (string_option, string_option))) [(".*suprnova.*", "http://www.suprnova.org/")]
83        

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26