Due to an IPV4Address class API change few days ago (endianess setting for ip field was changed), things broke in ed2k module (as was expected), so yesterday went to debugging and testing ed2k plugin against that change. From what I can tell, everything's operational again.
Today was a rather interesting and progressive day. It started with cyberz's patch, adding Utils::timedCallback() method, which can be used to do standalone timed callbacks (formerly, an event table was needed to do this). In Hydranode shell module, trace command was updated to be more informative and less confusing (thanks to chemical for pointing this out). Following that, there's a number of BT-related patches:
- canComplete signal is emitted from PartData prior to completition attempt, allowing plugins to optionally delay the completition of a file until later time. Public tryComplete() method can be used to force the completition attempt again (also fires the canComplete signal again).
- BT module now handles canComplete signal and delays files completition until all relevant chunks have been verified.
- Pass relative offsets in pair<> instead of Range64 since they aren't really range (end can be smaller than begin). (was causing exceptions, since Range doesn't allow begin to be larger than end).
- Fixed offsets calculation in corruption handler.
- Save all affected files prior to hashing them.
- Hashing works properly across file boundaries now.
- Added PartData::onVerified signal, which is emitted whenever a chunk passes hash check.
- HAVE messages are now sent on chunk completition. Files are now lazily-completed (e.g. after all governing chunks have been verified).
As a result, BT downloading (using the bget utility) works rather well - I was able to complete three out of ~12 mp3z in the test torrent file. There seems to be some kind of +1-offset problem, on some conditions Locks are given at +1 offset from UsedRange beginning (and also seems they sometimes end at -1 offset from the end of the parent UsedRange), which causes 2-byte gaps near the end of the download.
Madcat, ZzZz