Registered Member
|
Hi all,
I'm experimenting to extend the functionality of the ZeroConf Plugin and I encountered some inexplicable errors: 1) torrentInterface->getStats().torrent_name returns sometimes the real torrent name concatenated with the character 'X'. Very weird, can someone explain me what has happened and who has appended that character? It's a mystery for me 2) I've found following definition of choked on this forum:
I was expermenting to download chunks from a local peer (discovered by ZeroConf!!!) and it did not work if the choked flag was set for this peer source. Can someone explain me why sometimes the choke flag is set for my local peer (and downloading from this peer will fail!) and sometimes not? |
Registered Member
|
And I want to use a custom ChunkSelector.
The only way I see to realize that my own chunk selector in my plugin will be called, is by using the TorrentControl method:
But this is not working right now because the default chunk selector is already set. Is it possible to replace the default chunk selector? Thanks! |
Moderator
|
That shouldn't happen. No X is added. Maybe a non 0 terminated character array problem ?
If the choked flag is on, the peer will not upload to you. The number of upload slots is limited, and a peer will only send unchoke packets to peers it gives an upload slot to. Every 30 seconds a peer will determine which are the best peers to upload to and it will send those an unchoke. To discover new better peers, it will also unchoke a random one. |
Moderator
|
This was added for the KGet people, who manage the TorrentControl objects in the KGet bittorrent plugin. So they can have their own ChunkSelector. So at the moment this is not possible. Why do you need a custom ChunkSelector ? |
Registered Member
|
Thanks for the reply!
I want to use a custom chunk selector for managing which chunks the client must download and which certainly not. I want a smooth collaboration between local peers to download a torrent file. When 2 or more local peers discover that they both downloading the same torrent file, they must each download a disjunct part of the torrent and afterwards they must exhange the chunks on the local network (which is mush faster). At the end all local peers will have the complete torrent file. The main purpose to implement a custom ChunkSelector is that every chunk is downloaded from the internet only once. Maybe there is another way to achieve this? |
Moderator
|
The trouble is that the ChunkSelector is created before the plugins are loaded. You will need to add a method to TorrentControl to replace the default ChunkSelector. |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft