BT downloader sample program implemented by Delphi, with all source code and file descriptions in the BT protocol package:
BTDemo.dpr, BTDemoF.pas, BTDemoF.dfm -- a simple bt downloader that supports simultaneous downloading of multiple .torrent files
btutils.pas – core bt components
DCP*.pas -- SHA algorithm source code (copied from DEC component package)
InetUtils.pas -- provides a function library for Internet downloads
SimpleSocks.pas -- socket component (TCP)
SortLists.pas – Sorted List component
ThreadTimer.pas -- timer and thread pool
DelayLists.pas -- a queue that delays 5 seconds before releasing Objects
FastShareMem.pas, MemPools.pas, ShareGlobals.inc -- used internally by ThreadTimer
Bit Torrent Specification.htm -- BT protocol document