* Properly nul-terminate the info hash and client id in the tracker

request.

* Implemented options for read-ahead of
chunks. 'preload_min_pipelined', 'preload_min_size' and
'preload_required_rate' are used to decide when to read-ahead a chunk.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@800 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-11-04 16:05:28 +00:00
parent 9d465de7e1
commit 0c393e1cdb
2 changed files with 11 additions and 0 deletions
+9
View File
@@ -514,6 +514,15 @@ initialize_option_handler(Control* c) {
variables->insert("timeout_safe_sync", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::timeout_safe_sync),
rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_timeout_safe_sync)));
variables->insert("preload_min_pipelined", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::preload_min_pipelined),
rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_preload_min_pipelined)));
variables->insert("preload_min_size", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::preload_min_size),
rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_preload_min_size)));
variables->insert("preload_required_rate", new utils::VariableValueSlot(rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::preload_required_rate),
rak::mem_fn(torrent::chunk_manager(), &torrent::ChunkManager::set_preload_required_rate)));
variables->insert("port_range", new utils::VariableStringSlot(rak::value_fn(std::string()), rak::bind_ptr_fn(&apply_port_range, c)));
variables->insert("hash_read_ahead", new utils::VariableValueSlot(rak::ptr_fn(torrent::hash_read_ahead), rak::bind_ptr_fn(&apply_hash_read_ahead, c)));