ChangeLog 75 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044
  1. 2006-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  2. * Release 0.5.0
  3. 2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  4. * src/PeerAbstractCommand.h
  5. (beforeSocketCheck): Removed.
  6. * src/PeerAbstractCommand.cc
  7. Modified in order to call executeInternal() even if socket check
  8. and upload limit check fail.
  9. * src/PeerInteractionCommand.h
  10. (keepAlive): Removed.
  11. (sendKeepAlive): New function.
  12. (checkHave): New function.
  13. (beforeSocketCheck): Removed.
  14. * src/PeerInteractionCommand.cc
  15. (executeInternal): Use peerInteraction->checkRequestSlot(). Added
  16. calls to checkHave() and sendKeepAlive().
  17. (keepAlive): Renamed to sendKeepAlive().
  18. (sendKeepAlive): New function.
  19. (beforeSocketCheck): Removed.
  20. (checkHave): New function.
  21. * src/BitfieldMan.cc
  22. (getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
  23. (getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
  24. 0.
  25. (getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
  26. * src/TorrentMan.h
  27. (UsedPieces): Removed.
  28. (Pieces): New type definition.
  29. * src/Piece.h: Updated doc.
  30. * src/Peer.h
  31. (totalLength): Removed.
  32. * src/Peer.cc
  33. (updateLatency): Fixed the latency calculation.
  34. * src/TorrentMan.cc
  35. (addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
  36. than or equal to MAX_PEER_LIST_SIZE.
  37. If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
  38. then return false.
  39. (deleteOldErrorPeers): Rewritten.
  40. (deleteUsedPiece): Fixed the miss use of STL remove.
  41. * src/PeerInteraction.h
  42. (Pieces): Removed.
  43. (deleteTimeoutRequestSlot): Removed.
  44. (deleteCompletedRequestSlot): Removed.
  45. (checkRequestSlot): New function.
  46. * src/PeerInteraction.cc
  47. (deleteTimeoutRequestSlot): Merged to checkRequestSlot().
  48. (deleteCompletedRequestSlot): Merged to checkRequestSlot().
  49. (checkRequestSlot): New function.
  50. * src/DownloadEngine.cc
  51. (run): Clear activeSockets before calling waitData().
  52. (waitData): Removed a call to activeSockets.clear().
  53. 2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  54. To attempt to handle EINTR:
  55. * src/SocketCore.cc
  56. (isReadable): Added EINTR handling.
  57. (isWritable): Added EINTR handling.
  58. To improve the performance:
  59. * src/AbstractCommand.cc
  60. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  61. * src/PeerInteractionCommand.h
  62. (receiveMessage): Renamed as receiveMessages().
  63. (receiveMessages): New function.
  64. * src/PeerInteractionCommand.cc
  65. (executeInternal): receiveMessage loop is moved to new receiveMessages
  66. () function. detectMessageFlooding() is moved here.
  67. (detectMessageFlooding): Use Util::difftvsec() instead of Util::difftv
  68. (). The flooding detection for have message is comment out.
  69. (checkLongTimePeerChoking): Use Util::difftvsec() instead of
  70. Util::difftv().
  71. (receiveMessage): Renamed as receiveMessages().
  72. (receiveMessages): New function.
  73. (keepAlive): Use Util::difftvsec() instead of Util::difftv().
  74. (beforeSocketCheck): Commented out checkLongTimePeerChoking().
  75. * src/SleepCommand.cc
  76. (execute): Use Util::difftvsec() instead of Util::difftv().
  77. * src/BitfieldMan.h
  78. (getNthBitIndex): New function.
  79. (hasMissingPiece): New function.
  80. (getAllMissingIndexes): New function.
  81. * src/BitfieldMan.cc
  82. (countSetBit): Rewritten.
  83. (getNthBitIndex): New function.
  84. (getMissingIndexRandomly): Rewritten.
  85. (hasMissingPiece): New function.
  86. (getAllMissingIndexes): New function.
  87. * src/TorrentMan.cc
  88. (hasMissingPiece): New function.
  89. (deleteUsedPiece): Rewritten using STL.
  90. * src/PeerInteraction.cc
  91. (getNewPieceAndSendInterest): Use TorrentMan::hasMissingPiece(), which
  92. is a little bit faster then TorrentMan::getMissingPieceIndex().
  93. (addRequests): Updated the number of pending requests.
  94. * src/PeerAbstractCommand.cc
  95. (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
  96. (execute): Returns true if TorrentMan::isHalt() is true.
  97. Corrected the condition of upload limit checking.
  98. * src/Util.h
  99. (countBit): New function.
  100. * src/Util.cc
  101. (nbits): New variable.
  102. (countBit): New function.
  103. * src/DownloadEngine.h
  104. (SockCmdMap): New type definition.
  105. (waitData): Added an argument.
  106. (addSocket): Added an argument.
  107. (addSocketForReadCheck): Added an argument.
  108. (addSocketForWriteCheck): Added an argument.
  109. * src/DownloadEngine.cc
  110. (run): Executes only commands whose sockets are ready to read or write.
  111. All commands are executed in every 1 second.
  112. (waitData): Calls select() again if it returned
  113. EINTR.
  114. (addSocket): Saves socket and command object pair to the map.
  115. (deleteSocket): Deletes socket and command object pair from the map.
  116. (addSocketForReadCheck): Added an argument.
  117. (addSocketForWriteCheck): Added an argument.
  118. * src/DownloadCommand.cc
  119. (executeInternal): Use Util::difftvsec() instead of Util::difftv().
  120. To send "event=stopped" to the tracker when the application finishes:
  121. * src/PeerChokeCommand.h
  122. (checkPoint): New variable.
  123. * src/PeerChokeCommand.cc
  124. (PeerChokeCommand): Added the initialization of checkPoint.
  125. (execute): The interval check is now done by checkPoint, not
  126. SleepCommand. Return true if TorrentMan::isHalt() is true.
  127. * src/TorrentMan.h
  128. (halt): New function.
  129. (hasMissingPiece): New function.
  130. (isHalt): New function.
  131. (setHalt): New function.
  132. * src/TorrentMan.cc
  133. (TorrentMan): Added the initialization of halt.
  134. * src/TorrentAutoSaveCommand.h
  135. (checkPoint): New variable.
  136. * src/PeerListenCommand.cc
  137. (execute): Returns true if TorrentMan::isHalt() is true.
  138. * src/main.cc
  139. (setSignalHander): Added flags argument.
  140. (torrentHandler): Just calls TorrentMan::setHalt(true) and returns.
  141. (main): Set SA_ONESHOT flag of the signal hander of SIGINT and SIGTERM.
  142. Removed printDownloadAbortMessage() after torrent downloading loop.
  143. * src/TorrentAutoSaveCommand.cc
  144. (TorrentAutoSaveCommand): Added the initialization of checkPoint.
  145. (execute): Returns true if TorrentMan::isHalt() is true.
  146. The interval check is now done by checkPoint, not SleepCommand.
  147. * src/TrackerWatcherCommand.cc
  148. (execute): If TorrentMan::isHalt(), then create a tracker request with
  149. event=stopped.
  150. * src/TrackerUpdateCommand.cc
  151. (prepareForRetry): Do not use SleepCommand here.
  152. (execute): Returns true if TorrentMan::isHalt() is true.
  153. Others:
  154. * src/TorrentMan.cc
  155. (getMissingPieceIndex): Updated log message.
  156. * src/PeerInteraction.cc
  157. (createPeerMessag): Updated log message.
  158. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  159. To add the ability to download several pieces in mix in a command and
  160. increase the number of request slots according to request-cancel
  161. latency:
  162. * src/PeerInteractionCommand.cc
  163. (executeInternal): The number of messages to be received at a time
  164. is increased from 10 to 50.
  165. * src/LogFactory
  166. (getInstance): Added NullLogger.
  167. * src/NullLogger.h: New class.
  168. * src/BitfieldMan.h
  169. (getMissingIndex): New function.
  170. * src/BitfieldMan.cc
  171. (getMissingIndex): New function.
  172. * src/TorrentMan.h
  173. (checkOutPiece): New function.
  174. (getMissingPieceIndex): New function.
  175. (getMissingFastPieceIndex): New function.
  176. (getMissingFastPiece): New function.
  177. * src/TorrentMan.cc
  178. (updatePiece): Rewritten using STL.
  179. (syncPiece): Rewritten using STL.
  180. (getMissingPiece): Rewritten using getMissingPieceIndex() and
  181. checkOutPiece().
  182. (getMissingPieceIndex): New function.
  183. (getMissingFastPieceIndex): New function.
  184. (getMissingFastPiece): New function.
  185. (checkOutPiece): New function.
  186. * src/PeerInteraction.h
  187. (Pieces): New type definition.
  188. (piece): Removed.
  189. (pieces): New variable.
  190. (getNewPieceAndSendInterest): Added the "piece" argument.
  191. (abortPiece): Added the "piece" argument.
  192. (abortAllPieces): New function.
  193. (isInRequestSlot): New function.
  194. (hasDownloadPiece): Added the "index" argument.
  195. (setDownloadPiece): Removed.
  196. (getDownloadPiece): Added the "index" argument.
  197. (updatePiece): New function.
  198. (createRequestMessage): Added the "index" argument.
  199. * src/PeerInteraction.cc
  200. (onChoked): Rewritten.
  201. (abortPiece): Rewirtten.
  202. (abortAllPieces): New function.
  203. (deleteTimeoutRequestSlot): Rewritten.
  204. Clarified code a little bit.
  205. (deleteCompletedRequestSlot): Rewritten.
  206. (isInRequestSlot): New function.
  207. (syncPiece): Rewritten.
  208. (updatePiece): New function.
  209. (getNewPieceAndSendInterest): Rewritten.
  210. (addRequests): Rewritten.
  211. (getDownloadPiece): Rewritten.
  212. (hasDownloadPiece): Rewritten.
  213. (createRequestMessage): Added the "index" argument.
  214. * src/common.h
  215. (BITFIELD_LEN_FROM_PIECES): Enclosed the variable in parentheses.
  216. (DIV_FLOOR): New definition.
  217. * src/PieceMessage.cc
  218. (receivedAction): Update request-piece latency here.
  219. * src/RequestSlot.h
  220. (getLatencyInMillis): New function.
  221. * src/RequestSlot.cc
  222. (isTimeout): Rewritten using getLatencyInMillis.
  223. (getLatencyInMillis): New function.
  224. * src/Piece.h
  225. (operator==): New function.
  226. (getMissingBlockIndex): New function.
  227. * src/Piece.cc
  228. (operator==): New function.
  229. (getMissingBlockIndex): New function.
  230. * src/Peer.h
  231. (DEFAULT_LATENCY): New definition.
  232. (latency): New variable.
  233. (updateLatency): New function.
  234. (getLatency): New function.
  235. * src/Peer.cc
  236. (resetStatus): Reset latecy.
  237. (updateLatency): New function.
  238. 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  239. * src/SocketCore.cc
  240. (isReadable): Added secure to the condition.
  241. * src/HttpConnection.cc
  242. (receiveResponse): Fixed a bug that causes no response header
  243. exception.
  244. * src/Peer.h
  245. (getFastSet): Fixed the return value type.
  246. 2006-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  247. To remove a wait from download loop:
  248. * src/DownloadEngine.cc
  249. (run): Comment out shortSleep.
  250. To rewrite the message handling:
  251. * src/CancelMessage.h: Derived from SimplePeerMessage.
  252. (msg): New variable.
  253. (create): New function.
  254. (send): Removed.
  255. (getMessage): New function.
  256. (getMessageLength): New function.
  257. * src/CancelMessage.cc
  258. (create): New function.
  259. (receivedAction): Replaced deleteRequestMessageInQueue with
  260. rejectPieceMessageInQueue.
  261. (send): Removed.
  262. (getMessage): New function.
  263. (getMessageLength): New function.
  264. * src/BitfieldMessage.h: Derived from SimplePeerMessage.
  265. (msg): New variable.
  266. (msgLength): New variable.
  267. (~BitfieldMessage): Deleted msg.
  268. (send): Removed.
  269. (getMessage): New function.
  270. (getMessageLength): New function.
  271. * src/BitfieldMessage.cc
  272. (create): New function.
  273. (send): Removed.
  274. (getMessage): New function.
  275. (getMessageLength): New function.
  276. * src/ChokeMessage.h: Derived from SimplePeerMessage.
  277. (msg): New variable.
  278. (sendPredicate): New function.
  279. (onSendComplete): New function.
  280. (send): Removed.
  281. (getMessage): New function.
  282. (getMessageLength): New function.
  283. (create): New function.
  284. * src/ChokeMessage.cc
  285. (create): New function.
  286. (send): Removed.
  287. (sendPredicate): New function.
  288. (getMessage): New function.
  289. (getMessageLength): New function.
  290. (onSendComplete): New function.
  291. * src/KeepAliveMessage.h: Derived from SimplePeerMessage.
  292. (msg): New variable.
  293. (send): Removed.
  294. (getMessage): New function.
  295. (getMessageLength): New function.
  296. * src/KeepAliveMessage.cc
  297. (send): Removed.
  298. (getMessage): New function.
  299. (getMessageLength): New function.
  300. * src/PortMessage.h
  301. (create): New function.
  302. (receivedAction): Updated log message.
  303. * src/PortMessage.cc: New file.
  304. * src/UnchokeMessage.h: Derived from SimplePeerMessage.
  305. (msg): New variable.
  306. (sendPredicate): New function.
  307. (onSendComplete): New function.
  308. (create): New function.
  309. (send): Removed.
  310. (getMessage): New function.
  311. (getMessageLength): New function.
  312. * src/UnchokeMessage.cc
  313. (create): New function.
  314. (send): Removed.
  315. (sendPredicate): New function.
  316. (getMessage): New function.
  317. (getMessageLength): New function.
  318. (onSendComplete): New function.
  319. * src/PieceMessage.h
  320. (leftPieceDataLength): Removed.
  321. (leftDataLength): New variable.
  322. (headerSend): New variable.
  323. (pendingCount): New variable.
  324. (msgHeader): New variable.
  325. (sendPieceData): New function.
  326. (incrementPendingCount): New function.
  327. (isPendingCountMax): New function.
  328. (create): New function.
  329. (getMessageHeader): New function.
  330. (getMessageHeaderLength): New function.
  331. * src/PieceMessage.cc
  332. (create): New function.
  333. (getMessageHeader): New function.
  334. (getMessageHeaderLength): New function.
  335. (send): Rewritten.
  336. (sendPieceData): New function.
  337. * src/HaveMessage.h: Derived from SimplePeerMessage.
  338. (msg): New variable.
  339. (create): New function.
  340. (getMessage): New function.
  341. (getMessageLength): New function.
  342. * src/HaveMessage.cc
  343. (create): New function.
  344. (send): Removed.
  345. (sendPieceData): New function.
  346. (getMessage): New function.
  347. (getMessageLength): New function.
  348. * src/RequestMessage.h: Derived from SimplePeerMessage.
  349. (msg): New variable.
  350. (create): New function.
  351. (send): Removed.
  352. (getMessage): New function.
  353. (getMessageLength): New function.
  354. * src/RequestMessage.cc
  355. (create): New function.
  356. (receivedAction): Added the handling of fast extension.
  357. Deleted torrentMan->addUploadLength, torrentMan->addDeltaUploadLength.
  358. (send): Removed.
  359. (getMessage): New function.
  360. (getMessageLength): New function.
  361. * src/InterestedMessage.h: Derived from SimplePeerMessage.
  362. (msg): New variable.
  363. (sendPredicate): New function.
  364. (onSendComplete): New function.
  365. (create): New function.
  366. (getMessage): New function.
  367. (getMessageLength): New function.
  368. * src/InterestedMessage.cc
  369. (create): New function.
  370. (send): Removed.
  371. (sendPieceData): New function.
  372. (getMessage): New function.
  373. (getMessageLength): New function.
  374. (onSendComplete): New function.
  375. * src/NotInterestedMessage.h: Derived from SimplePeerMessage.
  376. (msg): New variable.
  377. (sendPieceData): New function.
  378. (onSendComplete): New function.
  379. (create): New function.
  380. (send): Removed.
  381. (getMessage): New function.
  382. (getMessageLength): New function.
  383. * src/NotInterestedMessage.cc
  384. (create): New function.
  385. (send): Removed.
  386. (sendPredicate): New function.
  387. (getMessage): New function.
  388. (getMessageLength): New function.
  389. (onSendComplete): New function.
  390. * src/AllowedFastMessage.h: New class.
  391. * src/AllowedFastMessage.cc: New class.
  392. * src/RejectMessage.h: New class.
  393. * src/RejectMessage.cc: New class.
  394. * src/SuggestPieceMessage.h: New class.
  395. * src/SuggestPieceMessage.cc: New class.
  396. * src/HaveAllMessage.h: New class.
  397. * src/HaveAllMessage.cc: New class.
  398. * src/HaveNoneMessage.h: New class.
  399. * src/HaveNoneMessage.cc: New class.
  400. * src/HandshakeMessage.h: Derived from SimplePeerMessage.
  401. (msg): New variable.
  402. (reserved): New variable.
  403. (create): New function.
  404. (getId): New function.
  405. (receivedAction): New function.
  406. (getMessage): New function.
  407. (getMessageLength): New function.
  408. (isFastExtensionSupported): New function.
  409. * src/HandshakeMessage.cc
  410. (HandshakeMessage): Moved here from HandshakeMessage.h.
  411. (create): New function.
  412. (getMessage): New function.
  413. (getMessageLength): New function.
  414. (toString): Added the output of reserved field.
  415. (check): Added const qualifier.
  416. (isFastExtensionSupported): New function.
  417. * src/PeerMessageUtil.h
  418. (createChokeMessage): Removed.
  419. (createUnchokeMessage): Removed.
  420. (createInterestedMessage): Removed.
  421. (createNotInterestedMessage): Removed.
  422. (createHaveMessage): Removed.
  423. (createBitfieldMessage): Removed.
  424. (createRequestMessage): Removed.
  425. (createCancelMessage): Removed.
  426. (createPieceMessage): Removed.
  427. (createPortMessage): Removed.
  428. (createChokeMessage): Removed.
  429. (createUnchokeMessage): Removed.
  430. (createInterestedMessage): Removed.
  431. (createNotInterestedMessage): Removed.
  432. (createHaveMessage): Removed.
  433. (createBitfieldMessage): Removed.
  434. (createRequestMessage): Removed.
  435. (createCancelMessage): Removed.
  436. (createPieceMessage): Removed.
  437. (createKeepAliveMessage): Removed.
  438. (createHandshakeMessage): Removed.
  439. (setIntParam): New function.
  440. (createPeerMessageString): New function.
  441. * src/PeerMessageUtil.cc
  442. (createChokeMessage): Removed.
  443. (createUnchokeMessage): Removed.
  444. (createInterestedMessage): Removed.
  445. (createNotInterestedMessage): Removed.
  446. (createHaveMessage): Removed.
  447. (createBitfieldMessage): Removed.
  448. (createRequestMessage): Removed.
  449. (createCancelMessage): Removed.
  450. (createPieceMessage): Removed.
  451. (createPortMessage): Removed.
  452. (createRequestMessage): Removed.
  453. (createCancelMessage): Removed.
  454. (createPieceMessage): Removed.
  455. (createHaveMessage): Removed.
  456. (createChokeMessage): Removed.
  457. (createUnchokeMessage): Removed.
  458. (createInterestedMessage): Removed.
  459. (createNotInterestedMessage): Removed.
  460. (createBitfieldMessage): Removed.
  461. (createKeepAliveMessage): Removed.
  462. (createHandshakeMessage): Removed.
  463. (setIntParam): New function.
  464. (createPeerMessageString): New function.
  465. * src/PeerConnection.h
  466. (peer): Removed.
  467. (torrentMan): Removed.
  468. (createNLengthMessage): Removed.
  469. (setIntParam): Removed.
  470. (writeOutgoingMessageLog): Removed all overloaded functions.
  471. (PeerConnection): Deleted peer and torrentMan from its arguments.
  472. (sendMessage): New function.
  473. (sendHandshake): Removed.
  474. (sendKeepAlive): Removed.
  475. (sendChoke): Removed.
  476. (sendUnchoke): Removed.
  477. (sendInterested): Removed.
  478. (sendNotInterested): Removed.
  479. (sendHave): Removed.
  480. (sendBitfield): Removed.
  481. (sendRequest): Removed.
  482. (sendPiece): Removed.
  483. (sendPieceHeader): Removed.
  484. (sendPieceData): Removed.
  485. (sendCancel): Removed.
  486. (getPeer): Removed.
  487. * src/PeerConnection.cc
  488. (PeerConnection): Deleted peer and torrentMan from its arguments.
  489. (sendHandshake): Removed.
  490. (sendKeepAlive): Removed.
  491. (createNLengthMessage): Removed.
  492. (setIntParam): Removed.
  493. (writeOutgoingMessageLog): Removed all overloaded functions.
  494. (sendChoke): Removed.
  495. (sendUnchoke): Removed.
  496. (sendInterested): Removed.
  497. (sendNotInterested): Removed.
  498. (sendHave): Removed.
  499. (sendBitfield): Removed.
  500. (sendRequest): Removed.
  501. (sendPiece): Removed.
  502. (sendPieceHeader): Removed.
  503. (sendPieceData): Removed.
  504. (sendMessage): New function.
  505. (sendCancel): Removed.
  506. * src/PeerInteractionCommand.cc
  507. (PeerInteractionCommand): Call setUploadLimit.
  508. (executeInternal): Call setUploadLimit.
  509. Added the handling of "inProgress" state of handshake message.
  510. Call sendBitfield() or sendAllowdFast() instead of deprecated
  511. sendNow().
  512. (keepAlive): Call addMessage and sendMessage instead of deprecated
  513. sendNow().
  514. (beforeSocketCheck): Call addMessage instead of deprecated trySendNow()
  515. * src/TorrentMan.h
  516. (PEER_ID_LENGTH): New definition.
  517. (hasAllPieces): New function.
  518. * src/TorrentMan.cc
  519. (getMissingPiece): Added the handling of fast extension.
  520. (cancelPiece): Call updatePiece().
  521. (hasAllPieces): New function.
  522. * src/PeerInteraction.h
  523. (fastSet): New variable.
  524. (getNewPieceAndSendInterest): Changed the return type to void.
  525. (send): Renamed as sendMessages.
  526. (deleteAllRequestSlot): Removed.
  527. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  528. (cancelAllRequest): Removed all overloaded functions.
  529. (deleteAllRequestSlot): Removed.
  530. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  531. (rejectPieceMessageInQueue): New function.
  532. (rejectAllPieceMessageInQueue): New function.
  533. (onChoked): New function.
  534. (isSendingMessageInProgress): New function.
  535. (getCorrespondingRequestSlot): Changed its arguments.
  536. (isInFastSet): New function.
  537. (addFastSetIndex): New function.
  538. (addRequests): New function.
  539. (sendNow): Removed.
  540. (trySendNow): Removed.
  541. (sendBitfield): New function.
  542. (sendAllowdFast): New function.
  543. (createHaveAllMessage): New function.
  544. (createHaveNoneMessage): New function.
  545. (createRejectMessage): New function.
  546. (createAllowedFastMessage): New function.
  547. * src/PeerInteraction.cc
  548. (send): Renamed as sendMessages.
  549. (sendMessages): New function.
  550. (MsgPushBack): New class.
  551. (isSendingMessageInProgress): New function.
  552. (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
  553. (rejectAllPieceMessageInQueue): New function.
  554. Added the handling of fast extension.
  555. (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
  556. (rejectPieceMessageInQueue): New function.
  557. Added the handling of fast extension.
  558. (deleteRequestSlot): Replaced for loop with std::find.
  559. (onChoked): New function.
  560. (deleteAllRequestSlot): Removed.
  561. (abortPiece): Rewirtten.
  562. (deleteTimeoutRequestSlot): Updated log messages.
  563. (getCorrespondingRequestSlot): Changed its arguments.
  564. (cancelAllRequest): Removed all overloaded functions.
  565. (receiveHandshake): Added the check to see whether an incoming peer
  566. supports fast extension.
  567. (createHandshakeMessage): Use HandshakeMessage::create instead of
  568. PeerMessageUtil.
  569. (createPeerMessage): Use create() of each message class instead of
  570. PeerMessageUtil.
  571. HaveAllMessage, HaveNoneMessage, RejectMessage, SuggestPieceMessage,
  572. AllowedFastMessage were added.
  573. (getNewPieceAndSendInterest): Changed its return value type to void.
  574. Added the handling of fast extension.
  575. (addRequests): New function.
  576. (sendNow): Removed.
  577. (sendHandshake): Rewritten.
  578. (trySendNow): Removed.
  579. (sendBitfield): New function.
  580. (sendAllowdFast): New function.
  581. (isInFastSet): New function.
  582. (addFastSetIndex): New function.
  583. (createRequestMessage): Use RequestMessage::create instead of
  584. PeerMessageUtil.
  585. (createCancelMessage): Use CancelMessage::create instead of
  586. PeerMessageUtil.
  587. (createPieceMessage): Use PieceMessage::create instead of
  588. PeerMessageUtil.
  589. (createHaveMessage): Use HaveMessage::create instead of
  590. PeerMessageUtil.
  591. (createChokeMessage): Use ChokeMessage::create instead of
  592. PeerMessageUtil.
  593. (createUnchokeMessage): Use UnchokeMessage::create instead of
  594. PeerMessageUtil.
  595. (createInterestedMessage): Use InterestedMessage::create instead of
  596. PeerMessageUtil.
  597. (createNotInterestedMessage): Use NotInterestedMessage::create instead
  598. of PeerMessageUtil.
  599. (createBitfieldMessage): Use BitfieldMessage::create instead of
  600. PeerMessageUtil.
  601. (createKeepAliveMessage): Use KeepAliveMessage::create instead of
  602. PeerMessageUtil.
  603. (createHaveAllMessage): New function.
  604. (createHaveNoneMessage): New function.
  605. (createRejectMessage): New function.
  606. (createAllowedFastMessage: New function.
  607. * src/Util.h
  608. (sha1Sum): New function.
  609. (computeFastSet): New function.
  610. * src/Util.cc
  611. (sha1Sum): New function.
  612. (computeFastSet): New function.
  613. * src/Peer.h
  614. (fastExtensionEnabled): New variable.
  615. (fastSet): New variable.
  616. (setAllBitfield): New function.
  617. (setFastExtensionEnabled): New function.
  618. (isFastExtensionEnabled): New function.
  619. (addFastSetIndex): New function.
  620. (getFastSet): New function.
  621. (isInFastSet): New function.
  622. (countFastSet): New function.
  623. * src/Peer.cc
  624. (isInFastSet): New function.
  625. (addFastSetIndex): New function.
  626. (setAllBitfield): New function.
  627. * src/AbstractCommand.cc (execute): Changed the procedure of checking
  628. sockets.
  629. * src/PeerAbstractCommand.cc
  630. (PeerAbstractCommand): Added the initialization for uploadLimitCheck
  631. and uploadLimit.
  632. (execute): Changed the procedure of checking sockets. The upload speed
  633. checking were added.
  634. (setUploadLimit): New function.
  635. (setUploadLimitCheck): New function.
  636. * src/PeerAbstractCommand.h
  637. (setUploadLimit): New function.
  638. (setUploadLimitCheck): New function.
  639. (uploadLimit): New variable.
  640. (uploadLimitCheck): New variable.
  641. To contact a tracker regularly:
  642. * src/TrackerWatcherCommand.h (interval): New variable.
  643. (checkPoint): New variable.
  644. (TrackerWatcherCommand): Added interval argument.
  645. * src/TrackerWatcherCommand.cc
  646. (TrackerWatcherCommand): Initialized checkPoint.
  647. (execute): Now a tracker is contacted in every specified period.
  648. If peer list is not needed, send request with numwant=0.
  649. * src/TrackerUpdateCommand.cc
  650. (execute): Updated log messages.
  651. * src/DownloadEngine.cc
  652. (~DownloadEngine): Removed two asserts.
  653. (waitData): Uncommented wfds. May be a bug fix.
  654. 2006-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  655. * src/PeerInteractionCommand.h
  656. (checkInactiveConnection): Removed.
  657. * src/PeerInteractionCommand.cc
  658. (executeInternal): Removed following function calls:
  659. detectMessageFlooding(), checkLongTimePeerChoking and
  660. checkInactiveConnection().
  661. (checkInactiveConnection): Removed.
  662. (detectMessageFlooding): Removed function call to
  663. checkInactiveConnection().
  664. * src/PeerMessageUtil.h
  665. (createChokeMessage): New function. Overload.
  666. (createUnchokeMessage): New function. Overload.
  667. (createInterestedMessage): New function. Overload.
  668. (createNotInterestedMessage): New function. Overload.
  669. (createHaveMessage): New function. Overload.
  670. (createBitfieldMessage): New function. Overload.
  671. (createRequestMessage): New function. Overload.
  672. (createCancelMessage): New function. Overload.
  673. (createPieceMessage): New function. Overload.
  674. (createKeepAliveMessage): New function. Overload.
  675. * src/PeerMessageUtil.cc
  676. (createChokeMessage): New function. Overload.
  677. (createUnchokeMessage): New function. Overload.
  678. (createInterestedMessage): New function. Overload.
  679. (createNotInterestedMessage): New function. Overload.
  680. (createHaveMessage): New function. Overload.
  681. (createBitfieldMessage): New function. Overload.
  682. (createRequestMessage): New function. Overload.
  683. (createCancelMessage): New function. Overload.
  684. (createPieceMessage): New function. Overload.
  685. (createKeepAliveMessage): New function. Overload.
  686. * src/SendMessageQueue.cc
  687. (createRequestMessage): Use PeerMessageUtil.
  688. (createCancelMessage): Use PeerMessageUtil.
  689. (createPieceMessage): Use PeerMessageUtil.
  690. (createHaveMessage): Use PeerMessageUtil.
  691. (createChokeMessage): Use PeerMessageUtil.
  692. (createUnchokeMessage): Use PeerMessageUtil.
  693. (createInterestedMessage): Use PeerMessageUtil.
  694. (createNotInterestedMessage): Use PeerMessageUtil.
  695. (createBitfieldMessage): Use PeerMessageUtil.
  696. (createKeepAliveMessage): Use PeerMessageUtil.
  697. * src/SendMessageQueue.h: Renamed to PeerInteraction.h
  698. * src/SendMessageQueue.cc: Renamed to PeerInteraction.cc
  699. * src/PeerInteraction.h: New class.
  700. * src/PeerInteraction.cc: New class.
  701. 2006-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  702. Each peer message has its own class.
  703. * src/PendingMessages.h: Removed.
  704. * src/PendingMessages.cc: Removed. The sending process was moved to
  705. each message class.
  706. * src/RequestSlotMan.h: Removed.
  707. * src/RequestSlotMan.cc: Removed. All functionarities were moved to
  708. SendMessageQueue.
  709. * src/RequestMessage.h: New class.
  710. * src/RequestMessage.cc: New class.
  711. * src/CancelMessage.h: New class.
  712. * src/CancelMessage.cc: New class.
  713. * src/BitfieldMessage.h: New class.
  714. * src/BitfieldMessage.cc: New class.
  715. * src/ChokeMessage.h: New class.
  716. * src/ChokeMessage.cc: New class.
  717. * src/KeepAliveMessage.h: New class.
  718. * src/KeepAliveMessage.cc: New class.
  719. * src/PortMessage.h: New class.
  720. * src/UnchokeMessage.h: New class.
  721. * src/UnchokeMessage.cc: New class.
  722. * src/PieceMessage.h: New class.
  723. * src/PieceMessage.cc: New class.
  724. * src/HaveMessage.h: New class.
  725. * src/HaveMessage.cc: New class.
  726. * src/BitfieldMessage.h: New class.
  727. * src/BitfieldMessage.cc: New class.
  728. * src/NotInterestedMessage.h: New class.
  729. * src/NotInterestedMessage.cc: New class.
  730. * src/InterestedMessage.h: New class.
  731. * src/InterestedMessage.cc: New class.
  732. * src/HandshakeMessage.h (sendMessageQueue): New variable.
  733. (getSendMessageQueue): New function.
  734. (setSendMessageQueue): New function.
  735. * src/HandshakeMessage.cc: New class.
  736. * src/PeerConnection.h (receiveMessage): Changed return value and
  737. arguments.
  738. (receiveHandshake): Changed return value and arguments.
  739. * src/PeerConnection.cc (receiveMessage): Do not create message class
  740. here.
  741. (receiveHandshake): Do not create handshake class here.
  742. * src/PeerInteractionCommand.h (peerConnection): Removed.
  743. (piece): Removed.
  744. (syncPiece): Removed.
  745. (sendInterest): Removed.
  746. (sendMessages): Removed.
  747. (createRequestPendingMessage): Removed.
  748. (checkPieceHash): Removed.
  749. (erasePieceOnDisk): Removed.
  750. (getNewPieceAndSendInterest): Removed.
  751. (onGotNewPice): Removed.
  752. (onGotWrongPiece): Removed.
  753. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  754. Removed peerConnection, piece.
  755. (~PeerInteractionCommand): Removed peerConnection.
  756. (executeInternal): Use sendMessageQueue instead of peerConnection.
  757. (syncPiece): Moved to SendMessageQueue.
  758. (decideChoking): Removed PendingMessage.
  759. (receiveMessage): Use sendMessageQueue instead of peerConnection.
  760. The action after receiving peer message was moved to each message
  761. class.
  762. (onGotNewPice): Moved to SendMessageQueue.
  763. (onGotWrongPiece): Moved to SendMessageQueue.
  764. (getNewPieceAndSendInterest): Moved to SendMessageQueue.
  765. (sendInterest): Moved to SendMessageQueue.
  766. (createRequestPendingMessage): Removed.
  767. (sendMessages): Moved to SendMessageQueue.
  768. (onAbort): Use SendMessageQueue::abortPiece()
  769. (keepAlive): Use sendMessageQueue instead of peerConnection.
  770. (beforeSocketCheck): Use sendMessageQueue instead of peerConnection.
  771. (checkPieceHash): Moved to SendMessageQueue.
  772. (erasePieceOnDisk): Moved to SendMessageQueue.
  773. * src/PeerMessageUtil.h
  774. (createBitfieldMessage): Removed.
  775. (createHaveMessage): Changed return value and arguments.
  776. (createBitfieldMessage): Changed return value and arguments.
  777. (createRequestCancelMessage): Removed.
  778. (createPieceMessage): Changed return value and arguments.
  779. (getShortIntParam): New function.
  780. (checkIndex): Changed arguments.
  781. (checkBegin): Changed arguments.
  782. (checkLength): Changed arguments.
  783. (checkPieceOffset): Removed.
  784. (checkRange): New function.
  785. (checkBitfield): Changed arguments.
  786. (createPeerMessage): Removed.
  787. (checkIntegrity): Removed.
  788. (createHandshakeMessage): Changed arguments.
  789. (createChokeMessage): New function.
  790. (createUnchokeMessage): New function.
  791. (createInterestedMessage): New function.
  792. (createNotInterestedMessage): New function.
  793. (createRequestMessage): New function.
  794. (createCancelMessage): New function.
  795. (createPortMessage): New function.
  796. * src/PeerMessageUtil.cc
  797. (createBitfieldMessage): Removed.
  798. (createHaveMessage): Changed return value and arguments.
  799. (createBitfieldMessage): Changed return value and arguments.
  800. (createRequestCancelMessage): Removed.
  801. (createPieceMessage): Changed return value and arguments.
  802. (getShortIntParam): New function.
  803. (checkIndex): Changed arguments.
  804. (checkBegin): Changed arguments.
  805. (checkLength): Changed arguments.
  806. (checkPieceOffset): Removed.
  807. (checkRange): New function.
  808. (checkBitfield): Changed arguments.
  809. (createPeerMessage): Removed.
  810. (checkIntegrity): Removed.
  811. (createHandshakeMessage): Changed arguments.
  812. (createChokeMessage): New function.
  813. (createUnchokeMessage): New function.
  814. (createInterestedMessage): New function.
  815. (createNotInterestedMessage): New function.
  816. (createRequestMessage): New function.
  817. (createCancelMessage): New function.
  818. (createPortMessage): New function.
  819. * src/PeerMessage.h
  820. (id): Removed.
  821. (index): Removed.
  822. (begin): Removed.
  823. (length): Removed.
  824. (bitfield): Removed.
  825. (bitfieldLength): Removed.
  826. (block): Removed.
  827. (blockLength): Removed.
  828. (inProgress): New variable.
  829. (cuid): New variable.
  830. (peer): New variable.
  831. (sendMessageQueue): New variable.
  832. (logger): New variable.
  833. (setBitfield): Removed.
  834. (getBitfield): Removed.
  835. (setBlock): Removed.
  836. (getBlock): Removed.
  837. (getBitfieldLength): Removed.
  838. (getBlockLength): Removed.
  839. (isInProgress): New function.
  840. (toString): Made pure virtual.
  841. (check): New function.
  842. (send): New function.
  843. (receivedAction): New function.
  844. (getId): Made pure virtual.
  845. (setId): Removed.
  846. (getIndex): Removed.
  847. (setIndex): Removed.
  848. (getBegin): Removed.
  849. (setBegin): Removed.
  850. (getLength): Removed.
  851. (setLength): Removed.
  852. (getCuid): New function.
  853. (setCuid): New function.
  854. (getPeer): New function.
  855. (setPeer): New function.
  856. (getSendMessageQueue): New function.
  857. (setSendMessageQueue): New function.
  858. (ID): Removed.
  859. * src/PeerMessage.cc
  860. (setBitfield): Removed.
  861. (setBlock): Removed.
  862. (toString): Removed.
  863. * src/TorrentMan.h
  864. (getPieceLength): New function.
  865. (getPieceLength): New function.
  866. * src/SendMessageQueue.h
  867. (REQUEST_TIME_OUT): New definition.
  868. (RequestSlots): New definition.
  869. (MessageQueue): New definition.
  870. (requestSlotMan): Removed.
  871. (pendingMessages): Removed.
  872. (requestSlots): New variable.
  873. (messageQueue): New variable.
  874. (torrentMan): New variable.
  875. (peerConnection): New variable.
  876. (peer): New variable.
  877. (piece): New variable.
  878. (getNewPieceAndSendInterest): New function.
  879. (createPeerMessage): New function.
  880. (createHandshakeMessage): New function.
  881. (send): Made private.
  882. (setPeerMessageCommonProperty): New function.
  883. (deleteAllRequestSlot): New function.
  884. (deleteRequestMessageInQueue): New function.
  885. (cancelAllRequest): Made private.
  886. (cancelAllRequest): Made private.
  887. (countRequestSlot): Made private.
  888. (addPendingMessage): Removed.
  889. (deletePendingPieceMessage): Removed.
  890. (deletePendingRequestMessage): Removed.
  891. (addMessage): New function.
  892. (deletePieceMessageInQueue): New function.
  893. (deleteTimeoutRequestSlot): Changed argument.
  894. (deleteCompletedRequestSlot): Changed argument.
  895. (getCorrespoindingRequestSlot): Renamed to getCorrespondingRequestSlot.
  896. (getCorrespondingRequestSlot): New function.
  897. (countPendingMessage): Removed.
  898. (countMessageInQueue): New function.
  899. (getTorrentMan): New function.
  900. (getPeerConnection): New function.
  901. (hasDownloadPiece): New function.
  902. (getDownloadPiece): New function.
  903. (setDownloadPiece): New function.
  904. (syncPiece): New function.
  905. (sendMessages): New function.
  906. (sendNow): New function.
  907. (trySendNow): New function.
  908. (abortPiece): New function.
  909. (sendHandshake): New function.
  910. (receiveMessage): New function.
  911. (receiveHandshake): New function.
  912. (createRequestMessage): New function.
  913. (createCancelMessage): New function.
  914. (createPieceMessage): New function.
  915. (createHaveMessage): New function.
  916. (createChokeMessage): New function.
  917. (createUnchokeMessage): New function.
  918. (createInterestedMessage): New function.
  919. (createNotInterestedMessage): New function.
  920. (createBitfieldMessage): New function.
  921. (createKeepAliveMessage): New function.
  922. * src/SendMessageQueue.cc
  923. (SendMessageQueue): Removed requestSlotMan.
  924. Instantiated peerConnection here.
  925. (~SendMessageQueue): Removed requestSlotMan.
  926. Added deletion of peerConnection and the contents of messageQueue.
  927. (send): Updated according to the change of messageQueue.
  928. (addPendingMessage): Renamed to addMessage.
  929. (addMessage): New function.
  930. (deletePendingPieceMessage): Renamed to deletePieceMessageInQueue.
  931. (deletePieceMessageInQueue): New function.
  932. (deletePendingRequestMessage): Renamed to deleteRequestMessageInQueue.
  933. (deleteRequestMessageInQueue): New function.
  934. (deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was moved
  935. here.
  936. (deleteTimeoutRequestSlot): RequestSlotMan::deleteTimeoutRequestSlot
  937. (...) was moved here.
  938. (deleteAllRequestSlot): RequestSlotMan::deleteAllRequestSlot(...) was
  939. moved here.
  940. (deleteCompletedRequestSlot):
  941. RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
  942. (getCorrespondingRequestSlot):
  943. RequestSlotMan::getCorrespoindingRequestSlot(...) was moved here.
  944. And renamed to getCorrespondingRequestSlot, correcting a typo.
  945. (countPendingMessage): Renamed to countMessageInQueue.
  946. (countMessageInQueue): New function.
  947. (countRequestSlot): RequestSlotMan::countRequestSlot() was moved here.
  948. (receiveHandshake): New function.
  949. (createHandshakeMessage): New function.
  950. (receiveMessage): New function.
  951. (createPeerMessage): New function.
  952. (syncPiece): New function.
  953. (getNewPieceAndSendInterest): New function.
  954. (sendMessages): New function.
  955. (sendNow): New function.
  956. (trySendNow): New function.
  957. (sendHandshake): New function.
  958. (abortPiece): New function.
  959. (getDownloadPiece): New function.
  960. (getPeerMessageCommonProperty): New function.
  961. (createRequestMessage): New function.
  962. (createCancelMessage): New function.
  963. (createPieceMessage): New function.
  964. (createHaveMessage): New function.
  965. (createChokeMessage): New function.
  966. (createUnchokeMessage): New function.
  967. (createInterestedMessage): New function.
  968. (createNotInterestedMessage): New function.
  969. (createBitfieldMessage): New function.
  970. (createKeepAliveMessage): New function.
  971. To add simple Content-Disposition support:
  972. * src/HttpResponseCommand.h (determinFilename): New function.
  973. * src/HttpResponseCommand.cc (executeInternal):
  974. Use determinFilename(headers) instead of req->getFile() when comparing
  975. filename.
  976. (determinFilename): New function.
  977. (handleDefaultEncoding): Use determinFilename(headers) instead of
  978. req->getFile().
  979. (handleOtherEncoding): Use determinFilename(headers) instead of
  980. req->getFile().
  981. * src/Util.h (getContentDispositionFilename): New function.
  982. * src/Util.cc (getContentDispositionFilename): New function.
  983. * src/LogFactory.h (release): New function.
  984. * src/LogFactory.cc (release): New function.
  985. To fix a bug that causes out-of-bound exception when HTTP status
  986. line is wrong:
  987. * src/HttpConnection.cc (receiveResponse): Added a check for header
  988. size.
  989. * src/common.h (Deleter): New class.
  990. * src/SegmentMan.cc
  991. (~SegmentMan): Added deletion of splitter and diskWriter.
  992. * src/DownloadEngine.h
  993. (Commands): Use deque.
  994. (clearQueue): New function.
  995. * src/DownloadEngine.cc
  996. (~DownloadEngine): Added deletion of segmentMan.
  997. (cleanQueue): New function.
  998. * src/TorrentDownloadEngine.h
  999. (TorrentDownloadEngine): The implementation was moved to
  1000. TorrentDownloadEngine.cc.
  1001. (~TorrentDownloadEngine): The implementation was moved to
  1002. TorrentDownloadEngine.cc.
  1003. * src/TorrentDownloadEngine.cc
  1004. (~TorrentDownloadEngine): Added deletion of torrentMan.
  1005. * src/main.cc
  1006. (clearRequest): Removed.
  1007. (handler): Added deletion of e.
  1008. (torrentHandler): Added deletion of te.
  1009. (main): Do not share splitter.
  1010. Use Deleter instead of clearRequest.
  1011. Deletion of classes were updated.
  1012. 2006-05-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1013. * src/main.cc (main): Fixed typo.
  1014. * src/message.h: Fixed typo.
  1015. * po/de.po: Added German translation, thanks to Hermann J. Beckers.
  1016. 2006-04-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1017. To add --select-file command-line option:
  1018. * src/Util.cc
  1019. (unfoldRange): New function.
  1020. (getNum): New function.
  1021. (unfoldSubRange): New function
  1022. * src/main.cc
  1023. (showUsage): Added help message.
  1024. (main): Added --select-file command-line option. Updated the layout of
  1025. file listing.
  1026. * src/common.h
  1027. (Integers): New definition.
  1028. * src/SocketCore.cc
  1029. (writeData): Removed timeout argument.
  1030. (readData): Removed timeout argument.
  1031. (peekData): Removed timeout argument.
  1032. * src/Socket.cc
  1033. (writeData): Removed timeout argument.
  1034. (readData): Removed timeout argument.
  1035. (peekData): Removed timeout argument.
  1036. * Release 0.4.1
  1037. 2006-04-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1038. To deploy upload rate based choking algorithm:
  1039. * src/PeerInteractionCommand.cc
  1040. (PeerInteractionCommand): Add peer to TorrentMan::activePeers to track
  1041. peer currently used.
  1042. (decideChoking): Deleted the choke/unchoke decision algorithm when
  1043. download completes. Simplified.
  1044. (receiveMessage): Updated.
  1045. * src/TorrentMan.h
  1046. (activePeers): New variable.
  1047. (addActivePeer): New function.
  1048. (getActivePeers): New function.
  1049. (deleteActivePeer): New function.
  1050. * src/TorrentMan.cc
  1051. (addPeer): deleteOldErrorPeers is moved to the begining of the function
  1052. * src/PeerAbstractCommand.cc
  1053. (onAbort): Use peer->resetStatus().
  1054. * src/main.cc
  1055. (PeerChokeCommand.h): Included.
  1056. (main): Added the instance of ChokingCommand to the command queue.
  1057. * src/Peer.h
  1058. (amChoking): Renamed from amChocking
  1059. (chokingRequired): New variable.
  1060. (optUnchoking): New variable.
  1061. (deltaUpload): New variable.
  1062. (deltaDownload): New variable.
  1063. (addDeltaUpload): New function.
  1064. (resetDeltaUpload): New function.
  1065. (addDeltaDownload): New function.
  1066. (resetDeltaDownload): New function.
  1067. (addPeerUpload): Added a call to addDeltaUpload.
  1068. (addPeerDownload): Added a call to addDeltaDownload.
  1069. * src/Peer.cc
  1070. (shouldBeChoking): Renamed from shouldChoke.
  1071. (resetStatus): New function.
  1072. * src/PeerChokeCommand.h: New class.
  1073. * src/PeerChokeCommand.cc: New class.
  1074. To add lazy upload speed limiter:
  1075. * src/TorrentConsoleDownloadEngine.h: Moved the variables for
  1076. statistics calculation to TorrentDownloadEngine.
  1077. * src/TorrentConsoleDownloadEngine.cc
  1078. (sendStatistics): Renamed from printStatistics.
  1079. (initStatistics): Removed. Moved to TorrentDownloadEngine.
  1080. (calculateSpeed): Removed. Moved to TorrentDownloadEngine.
  1081. (calculateStatistics): Removed. Moved to TorrentDownloadEngine.
  1082. * src/TorrentDownloadEngine.h: Added the variables for statistics
  1083. calculation.
  1084. (sendStatistics): New function as pure virtual function.
  1085. (getUploadSpeed): New function.
  1086. * src/TorrentDownloadEngine.cc
  1087. (initStatistics): New function.
  1088. (calculateSpeed): New function.
  1089. (calculateStatistics): New function.
  1090. * src/SendMessageQueue.h
  1091. (uploadLength): New variable.
  1092. (send): Added an argument.
  1093. (setUploadLimit): New function.
  1094. (getUploadLimit): New function.
  1095. * src/SendMessageQueue.cc
  1096. (send): Added upload speed limiter.
  1097. * src/prefs.h
  1098. (PREF_UPLOAD_LIMIT): New definition.
  1099. * src/PeerInteractionCommand.cc
  1100. (PeerInteractionCommand): Set upload speed limit to sendMessageQueue.
  1101. * src/main.cc
  1102. (main): Added --upload-limit option
  1103. For bug fixes:
  1104. * src/main.cc
  1105. (showUsage): Corrected --listen-port help
  1106. Other changes:
  1107. * src/TorrentMan.cc
  1108. (getPeer): Return nullPeer if connection is grather than
  1109. MAX_PEER_UPDATE(15) in order to leave space for incoming peers.
  1110. 2006-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1111. To add some useful information to the exception message:
  1112. * src/SocketCore.cc : Updated messages.
  1113. * src/SegmentMan.cc :
  1114. * src/TorrentMan.cc : Updated messages.
  1115. * src/MultiDiskWriter.cc : Updated messages.
  1116. * src/Util.cc : Updated messages.
  1117. * src/AbstractDiskWriter.cc : Updated messages.
  1118. * src/PreAllocationDiskWriter.cc : Updated messages.
  1119. * src/message.cc : Added new messages. Updated some messages.
  1120. * src/TrackerWatcherCommand.h (MIN_PEERS): New definition.
  1121. * src/TrackerWatcherCommand.cc (execute): Use MIN_PEERS.
  1122. Updated threshold from 30 to 15.
  1123. * src/AbstractDiskWriter.h (filename): New variable.
  1124. * src/AbstractDiskWriter.cc (openExistingFile): Assigned filename.
  1125. (createFile): Assigned filename.
  1126. * src/main.cc: Updated the help message for http-auth-scheme.
  1127. * Release 0.4.0
  1128. 2006-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1129. To add TrackerUpdateCommand with which replaces
  1130. CompactTrackerResponseProcessor:
  1131. * src/TrackerWatcherCommand.h (req): Removed.
  1132. * src/TrackerWatcherCommand.cc (execute): Send a request to tracker
  1133. if the number of peer connections are less than 30.
  1134. * src/ByteArrayDiskWriter.h (readData): Implemented.
  1135. * src/SegmentMan.h (diskWriter): New function.
  1136. * src/SegmentMan.cc (init): Added a call to diskWriter->closeFile()
  1137. * src/main.cc : Removed #include "CompactTrackerResponseProcessor.h"
  1138. (main): Use TrackerUpdateCommand.
  1139. * src/TorrentMan.h (CompactTrackerResponseProcessor): Removed.
  1140. (req): New variable.
  1141. (setTrackerResponseProcessor): Removed.
  1142. (getTrackerResponseProcessor): Removed.
  1143. (processTrackerResponse): Removed.
  1144. * src/DownloadEngine.h (diskWriter): Removed.
  1145. * src/TorrentDownloadEngine.cc (afterEachIteration): Removed a call
  1146. to torrentMan->processTrackerResponse().
  1147. To add Util::expandBuffer:
  1148. * src/ByteArrayDiskWriter.h (expandBuffer): Removed.
  1149. * src/ByteArrayDiskWriter.cc (writeData): Use Util::expandBuffer().
  1150. * src/Util.h (expandBuffer): New function.
  1151. To fix the bug that causes segmentation fault when "-l ." is specified
  1152. in command-line option:
  1153. * src/SimpleLogger.h (SimpleLogger): Removed "filename" argument.
  1154. (openFile): New function.
  1155. (closeFile): New function.
  1156. * src/SimpleLogger.cc (SimpleLogger): Removed fopen.
  1157. (~SimpleLogger): Call closeFile();
  1158. * src/LogFactory.cc (getInstance): Added a call to slogger->openFile().
  1159. * src/main.cc (main): Added a check to see logger is configured
  1160. properly.
  1161. To enable HTTP authentication without specifying "--http-auth-scheme"
  1162. * src/prefs.h (PREF_HTTP_AUTH_ENABLED): New definition.
  1163. * src/HttpConnection.cc (createRequest): Send Authorization header
  1164. if PREF_HTTP_AUTH_ENABLED == V_TRUE.
  1165. * src/main.cc (main): Preset PREF_HTTP_AUTH_SCHEME to V_TRUE
  1166. If "--http-user" is specified, set PREF_HTTP_AUTH_ENABLED to V_TRUE
  1167. * src/Peer.cc (shouldChoke): Updated algorithm.
  1168. * src/message.h (EX_AUTH_FAILED): New definition.
  1169. (EX_FILE_OPEN): New definition.
  1170. * src/HttpResponseCommand.cc (checkResponse): Throw DlAbortEx
  1171. if status == 401.
  1172. (handleDefaultEncoding): Added a call to diskWriter->initAndOpenFile()
  1173. if req->isTorrent == true.
  1174. * src/main.cc (handler): Removed the check to see e->diskWriter != NULL
  1175. (torrentHandler): Removed the check to see diskAdaptor != NULL.
  1176. * src/AbstractDiskWriter.cc (openExistingFile): Updated messsage.
  1177. (createFile): Updated message.
  1178. 2006-04-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1179. To add a readout of estimated remaining time to normal HTTP/FTP
  1180. downloads:
  1181. * src/ConsoleDownloadEngine.h (startup): New variable.
  1182. (startupLength): New variable.
  1183. (isStartupLengthSet): New variable.
  1184. (avgSpeed): New variable.
  1185. (eta): New variable.
  1186. * src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout of
  1187. estimated remaining time.
  1188. (initStatistics): Initialized newly added variables.
  1189. (calculateStatistics): Calculate average speed and estimated remaining
  1190. time.
  1191. To decouple TorrentDownloadEngine from HttpResponseCommand:
  1192. * src/TrackerDownloadCommand.h: Removed.
  1193. * src/TrackerDownloadCommand.cc: Removed.
  1194. * src/TrackerInitCommand.h: Removed.
  1195. * src/TrackerInitCommand.cc: Removed.
  1196. * src/TrackerUpdateCommand.h: Removed.
  1197. * src/TrackerUpdateCommand.cc: Removed.
  1198. * src/TrackerWatcherCommand.cc (execute): The construction of request
  1199. url written in TrackerInitCommand was moved here. Do not create
  1200. tracker request command if torrentMan->trackers != 0.
  1201. * src/CompactTrackerResponseProcessor.h: New class.
  1202. * src/CompactTrackerResponseProcessor.cc: New class.
  1203. * src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
  1204. * src/HttpResponseCommand.cc (createHttpDownloadCommand):
  1205. Decoupled TorrentDownloadEngine from this.
  1206. * src/SegmentMan.h (init): New function.
  1207. * src/SegmentMan.cc (init): New function.
  1208. * src/TorrentMan.h (responseProcessor): New variable.
  1209. (trackers): New variable.
  1210. (setTrackerResponseProcessor): New function.
  1211. (getTrackerResponseProcessor): New function.
  1212. (processTrackerResponse): New function.
  1213. * src/TorrentMan.cc (Constructor): Initialized new variable trackers.
  1214. (processTrackerResponse): New function.
  1215. * src/main.cc (main): Use ByteArrayDiskWriter and
  1216. CompactTrackerResponseProcessor.
  1217. * src/TorrentDownloadEngine.cc (afterEachIteration): Call torrentMan->
  1218. processTrackerResponse().
  1219. * src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated a
  1220. readout.
  1221. * src/TorrentDownloadEngine.cc (afterEachIteration): Added log message
  1222. which indicates download has completed.
  1223. * src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
  1224. (closeFile): fd >= 0, not fd > 0
  1225. * src/main.cc (main): Added short cut for show-files.
  1226. Added short cut for torrent-file.
  1227. Added new command-line option listen-port.
  1228. Updated i18n messages.
  1229. 2006-04-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1230. To add LogFactory which creates singleton logger:
  1231. * src/LogFactory.h: New class.
  1232. * src/LogFactory.cc: New class.
  1233. * src/Command.h (logger): New variable.
  1234. (Constructor): Use LogFactory.
  1235. * src/AbstractCommand.cc: Use Command::logger
  1236. * src/PeerConnection.cc (Constructor): Deleted the argument logger.
  1237. Use LogFactory.
  1238. * src/SegmentSplitter.h : Made logger protected.
  1239. * src/SegmentSplitter.cc (Constructor): Use LogFactory.
  1240. * src/SegmentMan.cc (Constructor): Use LogFactory.
  1241. * src/DownloadEngine.h : Made logger protected.
  1242. * src/DownloadEngine.cc (Constructor): Use LogFactory.
  1243. * src/PeerInteractionCommand.cc : Use Command::logger.
  1244. * src/HttpResponseCommand.cc : Use Command::logger.
  1245. * src/SegmentMan.h : Made logger private.
  1246. * src/TorrentMan.h : Made logger private.
  1247. * src/TorrentMan.cc : Use LogFactory.
  1248. * src/FtpNegotiateCommand.cc : Use Command::logger.
  1249. * src/HttpConnection.h (Constructor): Deleted the argument logger.
  1250. * src/HttpConnection.cc (Constructor): Deleted the argument logger.
  1251. Use LogFactory.
  1252. * src/FtpConnection.h (Constructor): Deleted the argument logger.
  1253. * src/FtpConnection.cc (Constructor): Deleted the argument logger.
  1254. Use LogFactory.
  1255. * src/DownloadCommand.cc : Use Command::logger.
  1256. * src/PeerAbstractCommand.cc : Use Command::logger.
  1257. * src/PeerListenCommand.cc : Use Command::logger.
  1258. * src/PeerInitiateConnectionCommand.cc : Use Command::logger.
  1259. * src/HttpInitiateConnectionCommand.cc : Use Command::logger.
  1260. * src/FtpInitiateConnectionCommand.cc : Use Command::logger.
  1261. * src/TrackerWatcherCommand.cc : Use Command::logger.
  1262. * src/TrackerUpdateCommand.cc : Use Command::logger.
  1263. * src/TrackerDownloadCommand.cc : Use Command::logger.
  1264. * src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
  1265. Use LogFactory.
  1266. * src/SendMessageQueue.h (Constructor): Deleted the argument logger.
  1267. * src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
  1268. Use LogFactory.
  1269. * src/main.cc (main): Use LogFactory.
  1270. * src/DiskAdaptor.h (logger): New variable.
  1271. * src/DiskAdaptor.cc (Constructor): Use LogFactory.
  1272. * src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
  1273. 2006-04-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1274. * src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
  1275. parameter to a tracker request.
  1276. * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
  1277. * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
  1278. * src/main.cc (setSignalHander): New function.
  1279. (main): Added a handler for SIGTERM.
  1280. (handler): Updated message.
  1281. (torrentHandler): Updated message.
  1282. 2006-04-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1283. * src/TorrentConsoleDownloadEngine.cc
  1284. (onPartialDownloadingCompletes): Renamed as
  1285. onSelectiveDownloadingCompletes.
  1286. (onSelectiveDownloadingCompletes): Updated message.
  1287. To add DiskAdaptor which abstract DiskWriter family:
  1288. * src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
  1289. * src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
  1290. * src/BitfieldMan.cc (isAllBitSet): bug fix.
  1291. * src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
  1292. MultiDiskAdaptor.h.
  1293. (readFileEntry): Changed its arguments.
  1294. (setup): setupDiskWriter is merged into this function.
  1295. (setupDiskWriter): Removed.
  1296. (setFileFilter): New function.
  1297. (readFileEntryFromMetaInfoFile): Updated according to the changes
  1298. made in readFileEntry.
  1299. (getFilePath): Removed.
  1300. (getTempFilePath): Removed.
  1301. (getSegmentFilePath): Updated due to the removal of getFilePath.
  1302. (fixFilename): Removed.
  1303. (copySingleFile): Removed.
  1304. (splitMultiFile): Removed.
  1305. (deleteTempFile): Removed.
  1306. (setFileEntriesToDownload): Removed.
  1307. (isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
  1308. (isSelectiveDownloadingMode): New function.
  1309. (setAllMultiFileRequestedState): Removed.
  1310. (finishPartialDownloadingMode): Renamed as
  1311. finishSelectiveDownloadingMode.
  1312. (finishSelectiveDownloadingMode): New function.
  1313. (getPartialTotalLength): Renamed as getSelectedTotalLength.
  1314. (getSelectedTotalLength): New function.
  1315. (onDownloadComplete): Use diskAdaptor.
  1316. * src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
  1317. (Range): Removed.
  1318. (setMultiFileEntries): Renamed as setFileEntries.
  1319. (setFileEntries): New function.
  1320. * src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
  1321. (pieceLength): New variable.
  1322. * src/main.cc (printDownloadCompeleteMessage): New function.
  1323. (torrentHandler): Use diskAdaptor instead of diskWriter.
  1324. (main): Renamed torrent-show-files to show-files.
  1325. Rewritten file contents listing.
  1326. * src/TorrentMan.h (FileEntry): Removed.
  1327. (multiFileTopDir): Removed.
  1328. (multiFileEntries): Removed.
  1329. (diskWriter): Removed.
  1330. (diskAdaptor): New variable.
  1331. * src/DefaultDiskWriter.h (totalLength): New variable.
  1332. * src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
  1333. * src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
  1334. diskWriter.
  1335. * src/TorrentConsoleDownloadEngine.h
  1336. (partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
  1337. (partialTotalLength): Renamed as selectedTotalLength.
  1338. * src/AbstractDiskWriter.cc (openFile): If file exists, call
  1339. openExistingFile, otherwise call initAndOpenFile.
  1340. (closeFile): fd > 0, not fd != 0.
  1341. * src/DirectDiskAdaptor.h: New class.
  1342. * src/DirectDiskAdaptor.cc: New class.
  1343. * src/MultiDiskAdaptor.h: New class.
  1344. * src/MultiDiskAdaptor.cc: New class.
  1345. * src/CopyDiskAdaptor.h: New class.
  1346. * src/CopyDiskAdaptor.cc: New class.
  1347. * src/DiskAdaptor.h: New class.
  1348. * src/DiskAdaptor.cc: New class.
  1349. * src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
  1350. (PREF_SHOW_FILES): New definition.
  1351. 2006-04-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1352. To add the ability to download multi torrent into respective files
  1353. directly:
  1354. * src/DiskWriter.h (openFile): New function.
  1355. (seek): Removed.
  1356. * src/MultiDiskWriter.h: New class.
  1357. * src/MultiDiskWriter.cc: New class.
  1358. * src/AbstractDiskWriter.h (seek): Changed its scope from public to
  1359. protected.
  1360. (openFile): New function.
  1361. * src/AbstractDiskWriter.cc (openFile): New function.
  1362. * src/prefs.h (V_FALSE): New definition.
  1363. (PREF_DIRECT_FILE_MAPPING): New definition.
  1364. * src/TorrentMan.h (setupDiskWriter): New function.
  1365. (setAllMultiFileRequestedState): New function.
  1366. (onDownloadComplete): New function.
  1367. * src/TorrentMan.cc : Included MultiDiskWriter.h
  1368. (setupDiskWriter): New function.
  1369. (getFilePath): Updated.
  1370. (getTempFilePath): Updated.
  1371. (getSegmentFilePath): Updated.
  1372. (fixFilename): Updated.
  1373. (deleteTempFile): Updated.
  1374. (setAllMultiFileRequestedState): New function.
  1375. (setFileEntriesToDownload): Use setAllMultiFileRequestedState().
  1376. (finishPartialDownloadingMode): Reset requested flags.
  1377. (onDownloadComplete): New function.
  1378. * src/main.cc: Added --direct-file-mapping option.
  1379. Use TorrentMan::setupDiskWriter().
  1380. * src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
  1381. onDownloadComplete().
  1382. To fix ETA bug:
  1383. * src/Util.h (difftvsec): New function.
  1384. * src/Util.cc (difftvsec): New function.
  1385. * src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
  1386. type of "elapsed" instead of long long int.
  1387. (calculateStatistics): Use Util::difftvsec instead of Util::difftv.
  1388. The updates of statistics takes place every 1 seconds.
  1389. * src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
  1390. (calculateSpeed): Changed its argument signature.
  1391. * src/PeerMessage.cc (toString): Fixed message.
  1392. 2006-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1393. To print ETA:
  1394. * src/TorrentDownloadEngine.cc (afterEachIteration): Added download
  1395. completion handling when dealing with
  1396. TorrentMan::isPartialDownloadingMode() == true.
  1397. * src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
  1398. New function.
  1399. * src/TorrentConsoleDownloadEngine.h (startup): New variable.
  1400. (sessionDownloadLength): New variable.
  1401. (avgSpeed): New variable.
  1402. (eta): New variable.
  1403. * src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
  1404. new variables: eta, avgSpeed, startup.
  1405. (calculateSpeed): Calculate average speed and ETA.
  1406. (printStatistics): Added ETA.
  1407. * src/Util.h (secfmt): New function.
  1408. * src/Util.cc (secfmt): New function.
  1409. 2006-04-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1410. To detect "keep alive" flooding:
  1411. * src/PeerInteractionCommand.h (keepAliveCount): New variable
  1412. * src/PeerInteractionCommand.cc (Constructor): Initialized new
  1413. variable: keepAliveCount.
  1414. (detectMessageFlooding): Added "keep alive" flooding detection.
  1415. (receiveMessage): Increase keepAliveCount when "keep alive" message
  1416. received.
  1417. To add the ability to download only specified files in multi-file
  1418. torrent:
  1419. * src/BitfieldMan.h (filterBitfield): New variable.
  1420. (filterEnabled): New variable.
  1421. (setFilterBit): New function.
  1422. (enableFilter): New function.
  1423. (disableFilter): New function.
  1424. (isFilterEnabled): New function.
  1425. (getFilteredTotalLength): New function.
  1426. (getCompletedLength): New function.
  1427. * src/BitfieldMan.cc (Constructor): Initialized new variable:
  1428. filterBitfield, filterEnabled.
  1429. (CopyConstructor): Added filterBitfield and filterEnabled.
  1430. (operator==): Added filterBitfield and filterEnabled.
  1431. (Destructor): Added filterBitfield.
  1432. (getMissingIndex): Use filterBitfield.
  1433. (getMissingUnusedIndex): Use filterBitfield.
  1434. (getFirstMissingUnusedIndex): Use filterBitfield.
  1435. (getFirstMissingUnusedIndex): Use filterBitfield.
  1436. (getAllMissingIndexes): Use filterBitfield.
  1437. (countMissingBlock): Use filterBitfield.
  1438. (countBlock): Use filterBitfield.
  1439. (setBitInternal): Added new argument on.
  1440. (setUseBit): Use setBitInternal.
  1441. (unsetUseBit): Use setBitInternal.
  1442. (setBit): Use setBitInternal.
  1443. (unsetBit): Use setBitInternal.
  1444. (isAllBitSet): Use filterBitfield.
  1445. (setFilterBit): New function.
  1446. (addFilter): New function.
  1447. (enableFilter): New function.
  1448. (disableFilter): New function.
  1449. (clearFilter): New function.
  1450. (isFilterEnabled): New function.
  1451. (getFilteredTotalLength): New function.
  1452. (getCompletedLength): New function.
  1453. * src/TorrentMan.h [FileEntry](Constructor): Updated signature.
  1454. Initalized newly added variables.
  1455. [FileEntry](offset): New variable.
  1456. [FileEntry](extracted): New variable.
  1457. [FileEntry](requested): New variable.
  1458. (readFileEntry): New function.
  1459. (option): New variable.
  1460. (splitMultiFile): Removed const qualifier.
  1461. (fixFilename): Removed const qualifier.
  1462. (readFileEntryFromMetaInfoFile): New function.
  1463. (finishPartialDownloadingMode): New function.
  1464. (isPartialDownloadingMode): New function.
  1465. (setFileEntriesToDownload): New function.
  1466. (getCompletedLength): New function.
  1467. (getPartialTotalLength): New function.
  1468. * src/TorrentMan.cc (readFileEntry): New function.
  1469. (setup): Use readFileEntry. If no-preallocation option is specified,
  1470. use DefaultDiskWriter.
  1471. (readFileEntryFromMetaInfoFile): New function.
  1472. (fixFilename): Removed const qualifier.
  1473. (splitMultiFile): Removed const qualifier.
  1474. (setFileEntriesToDownload): New function.
  1475. (isPartialDownloadingMode): New function.
  1476. (finishPartialDownloadingMode): New function.
  1477. (getCompletedLength): New function.
  1478. (getPartialTotalLength): New function.
  1479. * src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
  1480. New variable.
  1481. (partialTotalLength): New variable.
  1482. (downloadLength): New variable.
  1483. (totalLength): New variable.
  1484. * src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
  1485. Added log.
  1486. (initStatistics): Initialized new variables: partialDownloadLengthDiff,
  1487. partialTotalLength, downloadLength, totalLength.
  1488. (calculate): Calculate downloadLength and totalLength.
  1489. * src/prefs.h :New definition PREF_NO_PREALLOCATION
  1490. * src/main.cc (addCommand): Changed argument signature.
  1491. (main): Added new variable: args. Added new option "torrent-show-files"
  1492. "no-preallocation". Usage is not updated yet.
  1493. 2006-04-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1494. * src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
  1495. 2006-04-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1496. Attempt to add the ability to listing file entries in a .torrent file.
  1497. This feature is not yet complete.
  1498. * src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
  1499. * src/TorrentMan.cc (getMultiFileEntries): New function.
  1500. (getName): New function.
  1501. * src/TorrentMan.h (getMultiFileEntries): New function.
  1502. (getName): New function.
  1503. * src/main.cc (main): Use above 2 funtion.
  1504. * Release 0.3.2
  1505. 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1506. * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
  1507. (detectMessageFlooding): Updated threshold value.
  1508. (checkLongTimePeerChoking): Updated timeout value.
  1509. (getNewPieceAndSendInterest): Added debug log.
  1510. * src/PeerInteractionCommand.h (checkInactiveConnection): New function
  1511. * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
  1512. (getPeer): Updated.
  1513. * src/TorrentMan.h: Added MAX_PEER_ERROR.
  1514. * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
  1515. * src/PeerListenCommand.cc (execute): Close connection if incoming peer
  1516. is localhost.
  1517. * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
  1518. * src/PendingMessage.cc (processMessage): Not to send piece message
  1519. if peer is not interested in the pieces localhost has.
  1520. * src/Peer.cc (shouldChoke): Updated.
  1521. * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
  1522. * src/Util.cc (isPowerOf): New function.
  1523. * src/Util.h (isPowerOf): New function.
  1524. * src/PeerMessageUtil.cc (checkLength): Added a check for length
  1525. whether or not it is power of 2.
  1526. 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1527. Added new class SendMessageQueue that includes PendingMessages and
  1528. RequestSlotMan.
  1529. * src/SendMessageQueue.h: New class.
  1530. * src/SendMessageQueue.cc: New class.
  1531. * src/PendingMessage.h: Added new member variable blockIndex and its
  1532. accessors.
  1533. (createRequestMessage): Updated.
  1534. * src/PendingMessage.cc (createRequestMessage): Updated.
  1535. * src/PeerInteractionCommand.cc (executeInternal): Updated with
  1536. SendMessageQueue.
  1537. (checkLongTimePeerChoking): Updated with SendMessageQueue.
  1538. (receiveMessage): Updated with SendMessageQueue.
  1539. (deletePendingPieceMessage): Removed.
  1540. (getNewPieceAndSendInterest): Updated with SendMessageQueue.
  1541. (sendInterest): Updated with SendMessageQueue.
  1542. (createRequestPendingMessage): Updated with SendMessageQueue.
  1543. (sendMessages): Updated with SendMessageQueue.
  1544. (onAbort): Updated with SendMessageQueue.
  1545. (keepAlive): Updated with SendMessageQueue.
  1546. (beforeSocketCheck): Updated SendMessageQueue.
  1547. * src/PeerInteractionCommand (sendMessages): Shuffle
  1548. missingBLockIndexes before using it.
  1549. Added its own timeout for peer connection.
  1550. * src/PeerAbstractCommand.h: Added member variable timeout and its
  1551. setter.
  1552. * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
  1553. * src/PeerInteractionCommand.cc (PeerInteractionCommand):
  1554. Added setTimeout() call.
  1555. (executeInternal): Added setTimeout() call.
  1556. * src/PeerAbstractCommand.cc (PeerAbstractCommand):
  1557. Added timeout.
  1558. (isTimeoutDetected): Updated.
  1559. * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
  1560. option.
  1561. Added *simple* message flooding checker.
  1562. * src/PeerInteractionCommand.cc (executeInternal):
  1563. Added detectMessageFlooding() call.
  1564. (detectMessageFlooding): New function.
  1565. (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
  1566. (beforeSocketCheck): Added detectMessageFlooding() call.
  1567. * src/PeerInteractionCommand.h: Added sendMessageQueue,
  1568. chokeUnchokeCount, haveCount, detectMessageFlooding().
  1569. Removed deletePendingPieceMessage(), getRequestSlot(),
  1570. deleteRequestSlot(), deleteAllRequestSlot().
  1571. * src/PeerInteractionCommand.cc (beforeSocketCheck):
  1572. Added checkLongTimePeerChoking() call.
  1573. * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
  1574. * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
  1575. if duplicate == false.
  1576. The parameter "uploaded" and "downloaded" in the tracker request are
  1577. the size since the client sent the "started" event to the tracker.
  1578. * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
  1579. uploaded size to preDownloadedSize, preUploadedSize respectively.
  1580. * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
  1581. getSessionDownloadedSize(), getSessionUploadedSize().
  1582. * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
  1583. getSessionUploadedSize() instead of getDownloadedSize(),
  1584. getUploadedSize().
  1585. * src/PendingMessage.cc (processMessage): Do not send request message
  1586. if the peer is choking the client.
  1587. * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
  1588. less than interval.
  1589. 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1590. * configure.in: Added gnutls support. Added several CPP macros.
  1591. * m4/openssl.m4: Added.
  1592. * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
  1593. readData(), peekData(). Added gnutls support.
  1594. * src/HttpDownloadCommand.cc: Removed SleepCommand.h
  1595. * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
  1596. TrackerInitCommand periodicaly(TorrentMan::minInterval).
  1597. * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
  1598. Instead, added a check for whether setup method has executed
  1599. successfully.
  1600. * src/TorrentMan.h: Added member vaiable setupComplete. Updated
  1601. DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
  1602. * src/Makefile.am: Updated.
  1603. * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
  1604. using whether OpenSSL or gcrypt, depending on the result of configure
  1605. script.
  1606. * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
  1607. messageDigest.h.
  1608. * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
  1609. * src/PeerListenCommand.cc: Added log about port binded successfully.
  1610. Fixed memory leak.
  1611. * src/main.cc: Added gnutls support. Replaced LIB_SSL with
  1612. ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
  1613. Removed instantiation of TrackerInitCommand. Instead,
  1614. TrackerWatcherCommand is instantiated and pushed to the command queue.
  1615. * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
  1616. ENABLE_SSL.
  1617. * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
  1618. * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
  1619. If a piece is already acquired by another command, delete the request
  1620. slots for the piece.
  1621. * src/TrackerUpdateCommand.cc (execute):
  1622. Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
  1623. Added a check whether peer list is null.
  1624. Fixed the bug that causes sending completed event to the tracker
  1625. several times.
  1626. * src/TrackerInitCommand.cc (execute):
  1627. Fixed the bug that causes sending completed event to the tracker
  1628. several times.
  1629. * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
  1630. by using messageDigest.h.
  1631. 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1632. * PeerConnection.cc: Replaced log message "keep-alive" with
  1633. "keep alive".
  1634. * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
  1635. localhost long time.
  1636. * TorrentMan.cc: When adding new peer with duplicate = true, if the
  1637. number of peer list is equal to or grater than MAX_PEER_LIST, delete
  1638. at most 100 failure entry from the list. If with duplicate = false,
  1639. MAX_PEER_LIST is not checked.
  1640. * PeerListenCommand.cc: Fixed the argument order of log message.
  1641. 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1642. * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
  1643. Added warn().
  1644. * SimpleLogger.h: Moved enum LEVEL to Logger.h.
  1645. Implemented warn().
  1646. Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
  1647. 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1648. * Request.h: Added AFTER_COMPLETED event.
  1649. * TorrentDownloadEngine.cc: Prints "Download complete" message
  1650. instead of downloaded size and progress(%) after download completes.
  1651. * PeerInteractionCommand.cc: After download completes, sends unchoke
  1652. message to the peer if it is interested in what localhost has
  1653. downloaded.
  1654. * TorrentMan.cc: In single-file mode, copy temporary file to the final
  1655. destination instead of just renaming it.
  1656. * TorrentMan.cc: Added deleteTempFile().
  1657. * PeerAbstractCommand.cc: do not stop execution after download
  1658. completes. This makes localhost a seeder.
  1659. * Util.{h,cc}: Added fileCopy().
  1660. * PeerListenCommand.cc: do not stop execution after download completes.
  1661. This makes localhost a seeder.
  1662. * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
  1663. Added TorrentMan::deleteTempFile() to torrentHandler.
  1664. Initialized the variable dir as ".".
  1665. * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
  1666. Deleted renameSingleFile().
  1667. Added copySingleFile(), deleteTempFile().
  1668. * DownloadEngine.h: Added virtual function afterEachIteration().
  1669. * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
  1670. in onEndOfRun() to afterEachIteration().
  1671. In onEndOfRun(), changed if condition to check whether filenameFixed is
  1672. true.
  1673. * Util.cc: Implemented fileCopy() using rangedFileCopy().
  1674. In rangedFileCopy(), added try-catch block to properly close file
  1675. descriptors.
  1676. * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
  1677. Added afterEachIteration(), isFilenameFixed().
  1678. * Peer.cc: Changed choking strategy.
  1679. * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
  1680. * TrackerInitCommand.cc: Send completed event only once.
  1681. * DownloadEngine.cc: Added a call to afterEachIteration().
  1682. * TrackerUpdateCommand.cc: Do not stop execution after download
  1683. completes.
  1684. * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
  1685. connect the peers at most MAX_PEER_UPDATE when a peer list is
  1686. received from a tracker.
  1687. * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
  1688. Decreased the number of failure peers to delete to 0(just comment out
  1689. the line).
  1690. * Release 0.3.1
  1691. 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1692. * PeerInteractionCommand.cc: added a call to
  1693. TorrentMan::unadvertisePiece in Destructor.
  1694. * PeerInteractionCommand.cc: make have message sent immediately
  1695. if the size of pending message queue is zero.
  1696. * TorrentMan.cc: set the maximum size of peer list to 250.
  1697. * TorrentMan.h: changed the container type of Peers and UsedPieces
  1698. to deque.
  1699. * Util.cc: fixed rangedFileCopy.
  1700. * AbstractDiskWriter.{h,cc}: moved digest context initialization
  1701. to Constructor. Also, moved digest cleanup to Destructor.
  1702. * MetaFileUtil.cc: fixed memory leak
  1703. * replaced std::vector with std::deque.
  1704. * AbstractCommand.cc: casted timeout value to long long int.
  1705. * ChunkedEncoding.cc: fixed memory leak.
  1706. * PeerInteractionCommand.cc: casted timeout value to long long int.
  1707. * SleepCommand.cc: casted timeout value to long long int.
  1708. * Data.cc: fixed memory leak.
  1709. * Data.cc: fixed toLLInt().
  1710. * BitfieldMan.cc: fixed memory leak.
  1711. * TorrentMan.cc: initialized storeDir to ".".
  1712. * TorrentMan.cc: fixed memory leak.
  1713. * TorrentMan.cc: corrected file paths of splitted files.
  1714. * PeerAbstractCommand.cc: casted timeout to long long int.
  1715. * main.cc: added delete(req) and delete(te->diskWriter).
  1716. * RequestSlot.cc: casted timeout value to long long int.
  1717. * Request.cc: fixed memory leak.
  1718. * PendingMessage.cc: make HAVE messages sent only when peer does not
  1719. have the piece.
  1720. * Peer.{h,cc}: added hasPiece(int index).
  1721. * main.cc: corrected addCommand.
  1722. 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1723. * BitTorrent protocol support added.
  1724. * Release 0.3.0
  1725. 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1726. * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
  1727. 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1728. * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
  1729. decoding did not work properly.
  1730. 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1731. * DownloadEngine.h: included sys/time.h
  1732. * DownloadEngine.cc: remove sys/time.h
  1733. * Makefile.am (SUBDIRS): Add intl.
  1734. * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
  1735. 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1736. * main.cc: correct help message for --http-auth-scheme.
  1737. * main.cc: changed e-mail address for bug reports.
  1738. * ja.po: added japanese translation.
  1739. 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1740. * SimpleLogger.cc: flush log file instead of stdout.
  1741. 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1742. * main.cc: Fixed command-line option: max-tries
  1743. * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
  1744. does not equal to seg.sp.
  1745. * DownloadCommand.cc: If EOF is got from the server and the total size
  1746. of file is not zero, then throw DlRetryEx.
  1747. * main.cc: Set the minium value of min-segment-size to 1024.
  1748. * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
  1749. fails because of a regression since 0.2.0 release.
  1750. 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1751. * HttpConnection.cc:
  1752. * common.h: defined the user agent name as macro
  1753. * DownloadEngine.{h, cc}:
  1754. * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
  1755. is now generated by ConsoleDownloadEngine not by DownloadEngine.
  1756. * main.cc: Download complete/abort message is now generated by main.
  1757. * Makefile.am (SUBDIRS): Add m4.
  1758. (ACLOCAL_AMFLAGS): New variable.
  1759. (EXTRA_DIST): New variable.
  1760. * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
  1761. * gettext: added gettext functionality
  1762. 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1763. * AbstractCommand.cc:
  1764. * DownloadCommand.{h, cc}: Aborted downloading commands now properly
  1765. unregister its cuid from SegmentMan.
  1766. * DownloadEngine.cc: .aria2 file was written when a downloading
  1767. failed with errors.
  1768. * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
  1769. Added "User-Agent" header to CONNECT proxy request.
  1770. Fixed "Proxy-Authorization" header. Now proxy authorization works
  1771. properly.
  1772. * Logger.h:
  1773. * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
  1774. * ChunkedEncoding.cc: Added #include directive for strings.h
  1775. * Release 0.2.1
  1776. 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1777. * Util.{h,cc}: added startsWith().
  1778. * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
  1779. Util::endsWith().
  1780. * SocketCore.cc: struct addrinfo is now zero-initialized.
  1781. * common.h: added #include directive of limit.h.
  1782. * DownloadEngine.cc: added #include directive of sys/time.h and
  1783. algorithm.
  1784. * Exception.h: added #include directive of stdio.h.
  1785. * AbstractCommand.h: added #include directive of sys/time.h.
  1786. * DownloadCommand.h: added #include directive of sys/time.h.
  1787. * *.h: added #include directive of common.h to all base classes.
  1788. subclasses' one was removed.
  1789. * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
  1790. does not define these macros.
  1791. 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1792. * Release 0.2.0
  1793. * main.cc:
  1794. * HttpInitiateConnectionCommand.{h,cc}:
  1795. * prefs.h:
  1796. * HttpConnection.{h,cc}: added --http-proxy-method option.
  1797. We can now use GET command in http proxy.
  1798. 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1799. * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
  1800. that splits slowest segment of SegmentMan::commands vector.
  1801. This is the default split algorithm of aria2.
  1802. * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
  1803. that splits first segment of SegmentMan::commands vector.
  1804. * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
  1805. * DownloadCommand.{h,cc}: Added downloading speed calculation.
  1806. * Segment.h:
  1807. * SegmentMan.cc: Added speed field to Segment.h
  1808. * main.cc: -s option now affects all URLs in command-line arguemtns.
  1809. * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
  1810. * message.h: Change file size related %d to %lld.
  1811. 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1812. * FtpInitiateConnectionCommand.{h,cc}:
  1813. * FtpNegotiationCommand.{h,cc}:
  1814. * FtpDownloadCommand.{h,cc}:
  1815. * FtpConnection.{h,cc}: Added FTP support
  1816. * SimpleLogger.cc: Log message now includes time information.
  1817. * main.cc: The value of --http-auth-scheme option is chagned from
  1818. 'BASIC' to 'basic'
  1819. * main.cc: Added --timeout command-line option.
  1820. * main.cc: Added --min-segment-size command-line option.
  1821. * main.cc: Added --max-retries command-line option.
  1822. * prefs.h: option string constants are now defined in prefs.h
  1823. 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1824. * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
  1825. * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
  1826. with version 0.1.0's one.
  1827. 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
  1828. * configure.in: Added --enable-ssl option to configure script.
  1829. * HttpConnection.cc: Make Request-URI an absolute path. Some servers
  1830. cannot permit absoluteURI as Request-URI.
  1831. * HttpConnection.cc: Added Referer support.
  1832. * main.cc: Added referer command-line option.
  1833. * main.cc: Added rety-wait command-line option.
  1834. * Exception.h: Fixed formating bug in Exception::setMsg()
  1835. * SocketCore.{h,cc}:
  1836. * Socket.{h, cc}:
  1837. * Request.cc:
  1838. * InitiateConnectionCommandFactory.cc:
  1839. * HttpRequestCommand.cc: Added HTTPS support.
  1840. * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
  1841. for SocketCore.
  1842. * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
  1843. size is wrong
  1844. * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
  1845. Encoding, it wrongly adds to Segment.ds buff length from the socket.
  1846. 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
  1847. * Release 0.1.0