1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036 |
- 2006-09-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/AbstractCommand.cc
- (execute): Check whether the download has finished before checking
- socket status.
- Return true if peerStat->getStatus() == REQUEST_IDLE.
- Do not exit even if no segment is available.
- * src/prefs.h
- (PREF_STARTUP_IDLE_TIME): New definition.
- * src/PeerInteractionCommand.cc
- (executeInternal): Removed max speed limit. Because it performs bad.
- (receiveMessages): Added max speed limit. This was better than above,
- but still a little bit to be desired. Sometimes the download speed
- became much faster than I specified.
- * src/SpeedCalc.h
- (start): New variable.
- (accumulatedLength): New variable.
- (getAvgSpeed): New function.
- * src/SpeedCalc.cc
- (reset): Added start, accumulatedLength.
- (update): Added calculation of an average speed.
- (getAvgSpeed): New function.
- * src/DownloadCommand.h
- (sw): Removed.
- * src/main.cc
- (main): Added PREF_STARTUP_IDLE_TIME.
- * src/PeerStat.h
- (STATUS): Added REQUEST_IDLE.
- (getMaxSpeed): Renamed as getMaxDownloadSpeed().
- (getAvgDownloadSpeed): New function
- (requestIdle): New function.
- * src/SegmentMan.h
- (SegmentEntryHandle): New type definition.
- (SegmentEntries): Now holds SegmentEntryHandle.
- (findSlowerSegmentEntry): New funtion.
- * src/SegmentMan.cc
- (save): Updated according to the changes in SegmentEntries.
- (read): Updated according to the changes in SegmentEntries.
- (FindSegmentEntryByIndex): Updated according to the changes in
- SegmentEntries.
- (FindSegmentEntryByCuid): Updated according to the changes in
- SegmentEntries.
- (checkoutSegment): Updated according to the changes in SegmentEntries.
- (onNullBitfield): Updated according to the changes in SegmentEntries.
- Renamed uitr as itr.
- (findSlowerSegmentEntry): New function.
- (getSegment): Updated according to the changes in SegmentEntries.
- Added the feature that cancels the segment with slow server and fast
- one takes it over.
- (cancelSegment): Updated according to the changes in SegmentEntries.
- (getDownloadLength): Updated according to the changes in
- SegmentEntries.
- (init): Assigned 0 to bitfield after deleting it.
-
- * src/DownloadCommand.cc
- (STARTUP_IDLE_TIME): Removed.
- (executeInternal): Use PREF_STARTUP_IDLE_TIME.
- * src/PeerChokeCommand.cc
- (optUnchokingPeer): Updated according to the changes in Peer.
- (ResetDelta): Removed.
- (UploadFaster): Updated according to the changes in Peer.
- (DownloadFaster): Updated according to the changes in Peer.
- (execute): I clarify the meaning of "upload" and "download" here.
- "upload" means the transfer from localhost to remote host.
- "download" means the transfer from remote host to localhost.
- Based on this rule, I swapped orderByUploadRate and
- orderByDownloadRate.
- * src/PeerInteractionCommand.cc
- (PeerInteraction): Removed peerInteraction->setUploadLImit().
- (executeInternal): Removed the argument of
- peerInteraction->sendMessages().
- (receiveMessages): Rewritten download speed limit.
- (sendKeepAlive): Removed peerInteraction->sendMessages().
- * src/HttpResponseCommand.cc
- (handleDefaultEncoding): If file size is unknown in torrent request,
- do not call segmentMan->initBitfield() here.
- Disabled persistent connection feature in torrent request.
- * src/UrlRequestInfo.h
- (UrlRequestInfo): Removed const qualifier from option.
- * src/TorrentMan.h
- (TransferStat): New class.
- (deltaDownloadLength): Removed.
- (deltaUploadLength): Removed.
- (addDeltaDownloadLength): Removed.
- (getDeltaDownloadLength): Removed.
- (resetDeltaDownloadLength): Removed.
- (addDeltaUploadLength): Removed.
- (getDeltaUploadLength): Removed.
- (resetDeltaUploadLength): Removed.
- (addActivePeer): Added peer->activate().
- (deleteActivePeer): Added peer->deactivate().
- (calculateStat): New function.
- * src/TorrentMan.cc
- (TorrentMan): Removed deltaDownloadLength and deltaUploadLength.
- (calculateStat): New function.
- * src/PeerInteraction.h
- (uploadLimit): Removed.
- (option): New variable.
- (setUploadLimit): Removed.
- (getUploadSpeed): Removed.
- (sendMessages): Removed the argument "currentUploadSpeed".
- * src/PeerInteraction.cc
- (prefs.h): Included.
- (PeerInteraction): Removed uploadLimit. Added option.
- (sendMessages): Rewritten upload speed limit.
- (sendHandshake): Removed the argument from sendMessages().
- (sendBitfield): Removed the argument from sendMessages().
- * src/PeerAbstractCommand.cc
- (execute): Commented out the portion of upload limit.
- (onAbort): Removed peer->resetStatus().
- * src/TorrentRequestInfo.cc
- (timeoutSpecified): Declared extern.
- (execute): Set timeout to 180 if timeout is not specified by.
- command-line.
- * src/PieceMessage.cc
- (receivedAction): Added peer->updateDownloadLength().
- Removed peer->addPeerUpload().
- Removed torrentMan->addDeltaDownloadLength().
- (send): Added peer->updateUploadLength().
- Removed peer->addPeerDownload().
- Removed torrentMan->addDeltaUploadLength().
- * src/main.cc
- (timeoutSpecified): New variable.
- (main): Set timeoutSpecified to false.
- If the command-line option "--upload-limit" is specified, then
- timeoutSpecified is set to true. This option will remain in the next
- release, but be deprecated in the future release.
- * src/TorrentRequestInfo.h
- (TorrentRequestInfo): Removed const qualifier from op.
- * src/PeerStat.h
- (uploadSpeed): New variable.
- (PeerStat): Added default value to cuid.
- (calculateUploadSpeed): New function.
- (updateUploadLength): New function.
- (getMaxUploadSpeed): New function.
- (getAvgUploadSpeed): New function.
- (reset): Added uploadSpeed. Set status to IDLE.
- * src/TorrentDownloadEngine.h
- (cp): Declared as Time.
- (sessionDownloadLengthArray): Removed.
- (sessionUploadLengthArray): Removed.
- (currentCp): Removed.
- (lastCalcStat): New variable
- (lastElapsed): Removed.
- (sessionDownloadLength): Removed.
- (calculateStat): New function.
- * src/TorrentDownloadEngine.cc
- (initStatistics): Removed lastElapsed, cp[],
- sessionDownloadLengthArray[], sessionUploadLengthArray[],
- currentCp, sessionDownloadLength.
- Added cp.reset() and lastCalcStat.reset().
- (calculateSpeed): Changed the name of the argument.
- (calculateStatistics): Rewritten.
- (calculateStat): New function.
- * src/Peer.h
- (PeerStat.h): Included.
- (peerUpload): Removed.
- (peerDownload): Removed.
- (peerStat): New variable.
- (sessionUploadLength): New variable.
- (sessionDownloadLength): New variable.
- (deltaUpload): Removed.
- (deltaDownload): Removed.
- (resetStatus): Made private.
- (Peer): Added sessionUploadLength, sessionDownloadLength.
- Removed peerUpload, peerDownload.
- (updateUploadLength): New function.
- (addDeltaUpload): Removed.
- (updateDownloadLength): New function.
- (resetDeltaUpload): Removed.
- (getDeltaUpload): Removed.
- (addDeltaDownload): Removed.
- (calculateUploadSpeed): New function.
- (resetDeltaDownload): Removed.
- (getDeltaDownload): Removed.
- (calculateDownloadSpeed): New function.
- (getSessionUploadLength): New function.
- (getSessionDownloadLength): New function.
- (activate): New function.
- (deactivate): New function.
- (addPeerUpload): Removed.
- (setPeerUpload): Removed.
- (getPeerUpload): Removed.
- (addPeerDownload): Removed.
- (setPeerDownload): Removed.
- (getPeerDownload): Removed.
-
- * src/Peer.cc
- (resetStatus): Removed resetDeltaUpload() and resetDeltaDownload().
-
- * src/MetalinkRequestInfo.h
- (MetalinkRequestInfo): Removed const qualifier from op.
- * src/RequestInfo.h
- (op): Removed const qualifier.
- (RequestInfo): Removed const qualifier from op.
- * src/prefs.h
- (PREF_MAX_SPEED_LIMIT): Renamed as PREF_MAX_DOWNLOAD_LIMIT.
- (PREF_UPLOAD_LIMIT): Renamed as PREF_MAX_UPLOAD_LIMIT.
- * src/PeerInteractionCommand.cc
- (PeerInteractionCommand): Use PREF_MAX_UPLOAD_LIMIT.
- (receiveMessages): Use PREF_MAX_DOWNLOAD_LIMIT.
- * src/PeerInteraction.cc
- (sendMessages): Use PREF_MAX_UPLOAD_LIMIT.
- * src/main.cc
- (showUsage): Updated the description of "--lowest-speed-limit" option.
- Added the description of "--max-download-limit" option.
- Removed the description of "--upload-limit" option.
- Added the description of "--max-upload-limit" option.
- (main): Use PREF_MAX_UPLOAD_LIMIT, PREF_MAX_DOWNLOAD_LIMIT.
- Added "--max-download-limit" option and "--max-upload-limit" option.
- Added the warning message if "--upload-limit" option is used.
- * src/DownloadCommand.cc
- (executeInternal): Use PREF_MAX_DOWNLOAD_LIMIT.
-
- 2006-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To rewrite segment download mechanism for HTTP/FTP download.
- Use BitfieldMan to manage segment download.
- * src/HttpResponseCommand.h
- (executeInternal): Pass the reference of segment.
- * src/AbstractCommand.cc
- (prepareForRetry): Call segmentMan->cancelSegment here.
- (onAbort): Call segmentMan->cancelSegment here.
- * src/HttpDownloadCommand.cc
- (prepareForNextSegment): New function.
- * src/DownloadEngineFactory.cc
- (newConsoleEngine): Removed splitter.
- (newTorrentConsoleEngine): Removed splitter.
- * src/Request.h
- (segment): Renamed from seg.
- * src/FtpInitiateConnectionCommand.h
- (executeInternal): Pass the reference of segment.
- * src/AbstractCommand.h
- (executeInternal): Pass the reference of segment.
- * src/pref.h
- (PREF_SEGMENT_SIZE): New definition.
- * src/HttpProxyRequestCommand.h
- (executeInternal): Pass the reference of segment.
- * src/HttpResponseCommand.cc
- (checkResponse): Allowed status 206 when a request range starts 0.
- (handleDefaultEncoding): Rewritten the code related to Segment.
- (handleOtherEncoding): Rewritten the code related to Segment.
- * src/SegmentMan.h
- (SegmentEntry): New class.
- (SegmentEntries): New type definition.
- (bitfield): New variable.
- (usedSegmentEntries): New variable.
- (onNullBitfield): New function.
- (checkoutSegment): New function.
- (segments): Removed.
- (splitter): Removed.
- (unregisterId): Removed.
- (getSegment): New function(overload)
- (getDownloadedSize): Removed.
- (cancelSegment): New function.
- (completeSegment): New function.
- (initBitfield): New function.
- (hasSegment): New function.
- (getDownloadLength): New function.
- * src/BitfieldMan.h
- (getStartIndex): New function.
- (getEndIndex): New function.
- (getMissingUnusedIndex): New function(overload).
- (getSparseMissingUnusedIndex): New function.
- * src/BitfieldMan.cc
- (getMissingIndexRandomly): Handle the last byte of bitfield properly.
- (getMissingUnusedIndex): New function(overload).
- (Range): New class.
- (getStartIndex): New function.
- (getEndIndex): New function.
- (getSparseMissingUnusedIndex): New function.
- (isBitSetInternal): Return false if the given index is less than 0.
- * src/HttpInitiateConnectionCommand.h
- (executeInternal): Pass the reference of segment.
- * src/FtpNegotiateCommand.h
- (executeInternal): Pass the reference of segment.
- * src/FtpNegotiateCommand.cc
- (recvSize): Initialize bitfield here.
- * src/FtpTunnelResponseCommand.h
- (executeInternal): Pass the reference of segment.
- * src/HttpConnection.cc
- (createRequest): Rewritten range header processing.
- * src/DownloadCommand.h
- (executeInternal): Pass the reference of segment.
- (prepareForRetry): Removed.
- (prepareForNextSegment): Added an argument segment. Made it a virtual
- function.
- * src/main.cc
- (main): Set the initial value of PREF_SEGMENT_SIZE to 1MB.
- * src/SegmentMan.cc
- (SegmentMan): Added bitfield. Removed splitter.
- (~SegmentMan): Added bitfield. Removed splitter.
- (unregisterId): Removed.
- (getSegment): Rewritten.
- (updateSegment): Rewritten.
- (save): Rewritten.
- (read): Rewritten.
- (finished): Rewritten.
- (getDownloadedSize): Removed.
- (initBitfield): New function.
- (FindSegmentEntryByIndex): New function object.
- (FindSegmentEntryByCuid): New function object.
- (checkoutSegment): New function.
- (onNullBitfield): New function.
- (getSegment): New function(overload).
- (CancelSegment): New function object.
- (cancelSegment): New function.
- (completeSegment): New function.
- (hasSegment): New function.
- (getDownloadLength): New function.
- * src/FtpInitiateConnectionCommand.cc
- (executeInternal): Load .aria2 file after hostname resolution finishes.
- * src/Segment.h: Rewritten.
- * src/Segment.cc (operator<<): New function.
- * src/HttpDownloadCommand.h
- (prepareForNextSegment): New function.
- * src/Request.cc
- (resetUrl): Made segment null.
- * src/DownloadEngine.cc
- (~DownloadEngine): Call cleanQueue before deleting segmentMan.
- * src/HttpProxyRequestCommand.h
- (executeInternal): Pass the reference of segment.
- * src/DownloadCommand.cc
- (executeInternal): Rewritten the code related to Segment.
- (prepareForRetry): Removed.
- (prepareForNextSegment): Rewritten.
- * src/FtpTunnelResponseCommand.h
- (executeInternal): Pass the reference of segment.
-
- To add HTTP 1.1 persistent connection support(experimental)
- * src/HttpRequestCommand.cc
- (executeInternal): Disable keep alive if it is disabled by
- configuration.
- * src/Request.h
- (keepAlive): New variable.
- (isKeepAlive): New function.
- (setKeepAlive): New function.
- * src/pref.h
- (PREF_HTTP_KEEP_ALIVE): New definition.
- * src/HttpResponseCommand.cc
- (executeInternal): Check the remote server supports keep alive.
- * src/HttpConnection.cc
- (createRequest): Send "Connection: close" only if keep alive is
- disabled.
- * src/main.cc
- (main):
- Set the initial value(false) of PREF_KEEP_ALIVE to false.
- To add max download speed limit:
- * src/pref.h
- (PREF_MAX_SPEED_LIMIT): New definition.
- * src/PeerInteractionCommand.cc
- (executeInternal): Added max download speed limit. Not tested yet.
- * src/SegmentMan.h
- (PeerStats): New type definition.
- (peerStats): New variable.
- (registerPeerStat): New function.
- (FindPeerStat): New function object.
- (getPeerStat): New function.
- (calculateDownloadSpeed): New function.
- * src/SpeedCalc.h: New class.
- * src/SpeedCalc.cc: New class.
- * src/main.cc
- (main):
- Set the initial value of PREF_MAX_SPEED_LIMIT to 0(which means the
- download speed is not restricted).
- * src/PeerStat.h: New class.
- * src/SegmentMan.cc
- (registerPeerStat): New function.
- (calculateDownloadSpeed): New function.
- * src/DownloadCommand.cc
- (STARTUP_IDLE_TIME): New definition.
- (DownloadCommand): Register peerStat to segmentMan. Call peerStat->
- downloadStart.
- (~DownloadCommand): Call peerStat->downloadStop.
- (executeInternal): Added download speed limitter. Rewritten lowest
- speed limitter.
- * src/HttpConnection.cc
- (receiveResponse): Fixed: eohIndex[headerBuf] -> headerBuf[eohIndex].
-
- * src/AbstractCommand.cc
- (resolveHostname): Throw DlAbortEx if a name resolution failes.
- Added hostname to the error message.
-
- * src/ConsoleDownloadEngine.cc
- (calculateStatistics): Initialize psize with dlSize.
- * src/PieceMessage.cc
- (receivedAction): Do not call peerInteraction->abortPiece here.
- (onGotWrongPiece): Call peerInteraction->abortPiece here.
- * src/BitfieldMan.h
- (clearAllUseBit): New function.
- (setAllUseBit): New function.
- * src/BitfieldMan.cc
- (clearAllBit): Do not clear useBitfield here.
- (clearAllUseBit): New function.
- (setAllUseBit): New function.
- * src/Piece.cc
- (clearAllBlock): Call bitfield->clearAllUseBit().
- 2006-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To make filename URL-decoded:
- * src/HttpResponseCommand.h: Updated doc.
- * src/HttpResponseCommand.cc
- (determinFilename): Made filename URL-decoded.
- * src/FtpInitiateConnectionCommand.cc
- (executeInternal): Made filename URL-decoded.
- * src/Util.h (urldecode): New function.
- * src/Util.cc (urldecode): New function.
- To fix a bug that caused assertion failure in ares_strerror:
- * src/NameResolver.cc (callback): Fixed the bug.
- * Release 0.7.3
-
- 2006-08-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To add --seed-time and --seed-ratio command-line option:
- * src/Option.h (getAsDouble): New function.
- * src/Option.cc (getAsDouble): New function.
- * src/SeedCheckCommand.h: New class.
- * src/SeedCheckCommand.cc: New class.
- * src/DownloadEngineFactory.cc
- (SeedCheckCommand.h): Included.
- (UnionSeedCriteria.h): Included.
- (TimeSeedCriteria.h): Included.
- (ShareRatioSeedCriteria.h): Included.
- (newTorrentConsoleEngine): Added the processing of seed option.
- * src/SeedCriteria.h: New class.
- * src/ShareRatioSeedCriteria.h: New class.
- * src/TimeSeedCriteria.h: New class.
- * src/UnionSeedCriteria.h: New class.
- * src/prefs.h
- (PREF_SEED_TIME): New definition.
- (PREF_SEED_RATIO): New definition.
- * src/main.cc
- (showUsage): Added --seed-time and --seed-ratio option.
- (main): Added --seed-time and --seed-ratio option.
- Made default log file name "/dev/null".
- * src/SharedHandle.h
- (SharedHandle): Copy constructor. Made it assignable from the
- SharedHandle of the subclasses.
- (operator=): Made it assignable from the SharedHandle of the
- subclasses.
- (getRefCount): New function.
-
- To add notice log level and the switch to write log to stdout. This
- switch is configurable per log level.
- * src/Logger.h
- (notice): New function.
- (LEVEL): Added NOTICE. Assigned an explicit value to each log level
- constant.
- * src/LogFactory.cc
- (getInstance): The use of NullLogger was removed. A log message with
- notice log level was made written to stdout along with log file.
- * src/NullLogger.h
- (notice): New function.
- * src/SimpleLogger.h
- (writeHeader): Added the 'file' argument.
- (writeLog): Added the 'file' argument.
- (writeFile): New function.
- (stdoutField): New variable.
- (SimpleLogger): Removed the default constructor.
- (SimpleLogger): Made the default value of logfile 0.
- (debug): Added 'virtual' keyword.
- (info): Added 'virtual' keyword.
- (warn): Added 'virtual' keyword.
- (error): Added 'virtual' keyword.
- (notice): New function.
- (setStdout): New function.
- * src/SimpleLogger.cc
- (WRITE_LOG): Replaced writeLog with writeFile.
- (WRITE_LOG_EX): Replaced writeLog with writeFile.
- (SimpleLogger): Removed the default constructor.
- (setStdout): New function.
- (writeLog): Added the handling of NOTICE log level.
- (writeFile): New function.
- (notice): New function.
- * src/TorrentMan.h: Updated doc.
- * src/BitfieldMan.h: Updated doc.
-
- * src/TrackerWatcherCommand.cc
- (execute): Return true if error occurred in the request to the tracker
- and halt is requested.
- * src/TrackerUpdateCommand.cc
- (execute): Return true if error occurred in the request to the tracker
- and halt is requested.
- To call onDownloadComplete from TorrentMan::completePiece(), not from
- DownloadEngine:
- * src/TorrentConsoleDownloadEngine.h
- (onSelectiveDownloadingCompletes): Removed.
- * src/TorrentConsoleDownloadEngine.cc
- (onSelectiveDownloadingCompletes): Removed.
- * src/TorrentDownloadEngine.h
- (onEndOfRun): Added 'virtual' keyword.
- (afterEachIteration): Removed.
- (onSelectiveDownloadingCompletes): Removed.
- * src/TorrentDownloadEngine.cc
- (onEndOfRun): Removed filenameFixed.
- (afterEachIteration): Removed.
- * src/TorrentMan.cc
- (completePiece): Call onDownloadComplete here.
- (onDownloadComplete): Added 2 log messages.
- 2006-08-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To fix compilation problem on gcc4.1.1(patch#1542283 by tizianomueller)
- * src/NameResolver.h: Added the prototype declaration of callback().
-
- To support c-ares library:
- * src/AbstractCommand.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
- * src/FeatureConfig.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
- * src/FtpInitiateConnectionCommand.h:
- Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
- * src/AbstractCommand.h: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
- * src/HttpInitiateConnectionCommand.h:
- Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
- * src/NameResolver.cc: Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS.
- Added thes upport of c-ares's ares_strerror(the idea came from patch
- #1542285 by tizianomueller)
- * src/HttpInitiateConnectionCommand.cc:
- Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
- * src/FtpInitiateConnectionCommand.cc:
- Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
- * src/DownloadEngine.h:
- Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
- * src/DownloadEngine.cc:
- Replaced HAVE_LIBARES with ENABLE_ASYNC_DNS
- To fix the bug that causes compilation failure with metalink-support
- disabled(bug#1543587):
- * src/main.cc: Fixed with the patch by tizianomueller.
- * Release 0.7.2
-
- 2006-08-14 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/main.cc
- (main): Added a message to inform users that aria2 is starting to
- verify checksum.
- * src/RequestInfo.cc
- (printDownloadAbortMessage): Added a message to inform users that
- transfer can be resumed.
- * src/FeatureConfig.cc
- (FEATURE_ASYNC_DNS): New definition.
- (FeatureConfig): Added aysnc DNS entry.
- To replace CommandUuid with Command* in SocketEntry and
- NameResolverEntry:
-
- * src/DownloadEngine.h
- (CommandUuids): Removed.
- (SocketEntry::commandUuid): Removed.
- (SocketEntry::command): New variable.
- (SocketEntry::SocketEntry): Updated.
- (SocketEntry::operator==): Updated.
- (NameResolverEntry::commandUuid): Removed.
- (NameResolverEntry::command): New variable.
- (NameResolverEntry::NameResolverEntry): Updated.
- (NameResolverEntry::operator==): Updated.
- (waitData): Changed the argument type.
- (addSocketForReadCheck): Changed the argument type.
- (deleteSocketForReadCheck): Changed the argument type.
- (addSocketForWriteCheck): Changed the argument type.
- (deleteSocketForWriteCheck): Changed the argument type.
- (addNameResolverCheck): Changed the argument type.
- (deleteNameResolverCheck): Changed the argument type.
- * src/DownloadEngine.cc
- (FindCommand): Removed.
- (run): Removed activeUuid. Added activeCommands instead.
- (AccumulateActiveUuid): Renamed as AccumulateActiveCommand.
- (AccumulateActiveCommand): New function object.
- (waitData): Use AccumulateActiveCommand.
- (addSocketForReadCheck): Use Command instead of CommandUuid.
- (deleteSocketForReadCheck): Use Command instead of CommandUuid.
- (addSocketForWriteCheck): Use Command instead of CommandUuid.
- (deleteSocketForWriteCheck): Use Command instead of CommandUuid.
- (addNameResolverCheck): Use Command instead of CommandUuid.
- (deleteNameResolverCheck): Use Command instead of CommandUuid.
- * src/AbstractCommand.cc
- (disableReadCheckSocket): Updated according to the changes in
- DownloadEngine.
- (setReadCheckSocket): Updated according to the changes in
- DownloadEngine.
- (disableWriteCheckSocket): Updated according to the changes in
- DownloadEngine.
- (setWriteCheckSocket): Updated according to the changes in
- DownloadEngine.
- (setNameResolverCheck): Updated according to the changes in
- DownloadEngine.
- (disableNameResolverCheck): Updated according to the changes in
- DownloadEngine.
- * src/AbstractCommand.cc
- (disableReadCheckSocket): Updated according to the changes in
- DownloadEngine.
- (setReadCheckSocket): Updated according to the changes in
- DownloadEngine.
- (disableWriteCheckSocket): Updated according to the changes in
- DownloadEngine.
- (setWriteCheckSocket): Updated according to the changes in
- DownloadEngine.
- * release 0.7.1
-
- 2006-08-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To handle the case where some BitTorrent tracker requires all letters
- except for [A-Za-z0-9] is URL encoded.
-
- * src/Util.h
- (torrentUrlencode): New function.
- * src/Util.cc
- (ctype.h): Included.
- (torrentUrlencode): New function.
- * src/TrackerWatcherCommand.cc
- (execute): Use Util::torrentUrlencode() instead of Util::urlencode().
-
- 2006-08-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To add asynchronous DNS support(libares):
- * src/AbstractCommand.h
- (setNameResolverCheck): New function.
- (disableNameResolverCheck): New function
- (resolveHostname): New function.
- * src/AbstractCommand.cc
- (setNameResolverCheck): New function.
- (disableNameResolverCheck): New function
- (resolveHostname): New function.
- * src/FtpInitiateConnectionCommand.h
- (nameResolver): New function.
- * src/FtpInitiateConnectionCommand.cc
- (Util.h): Included.
- (FtpInitiateConnectionCommand): Call disableReadCheckSocket,
- disableWriteCheckSocket.
- (~FtpInitiateConnectionCommand): Call disableNameResolverCheck.
- (executeInternal): Added async DNS support.
- * src/HttpInitiateConnectionCommand.h
- (nameResolver): New function.
- * src/HttpInitiateConnectionCommand.cc
- (DlRetryEx.h): Included.
- (HttpInitiateConnectionCommand): Call disableReadCheckSocket,
- disableWriteCheckSocket.
- (~HttpInitiateConnectionCommand): Call disableNameResolverCheck.
- (executeInternal): Added async DNS support.
- * src/NameResolver.h: New class. Note: #include <ares.h> is surrounded
- by extern "C" declaration.
- * src/NameResolver.cc: New class.
- * src/Util.h:
- (isNumberAndDotsNotation): New function
- * src/Util.cc
- (isNumberAndDotsNotation): New function.
- * src/DownloadEngine.h
- (NameResolver.h): Included.
- (NameResolverEntry): New class.
- (NameResolverEntries): New type definition.
- (addNameResolverCheck): New function.
- (deleteNameResolverCheck): New function.
- * src/DownloadEngine.cc
- (run): Initialize cp with 0.
- (SetDescriptor::operator()): Added for NameResolverEntry.
- (AccumulateActiveUuid::operator()): Added for NameResolverEntry.
- (waitData): Check nameResolver entries.
- (updateFdSet): Update fds in nameResolver entries.
- (addNameResolverCheck): New function.
- (deleteNameResolverCheck): new function.
-
- * src/PeerInteractionCommand.cc
- (executeInternal): Fixed wrong socket handling.
- * src/main.cc
- (main): Fixed the initial value of PREF_LOWEST_SPEED_LIMIT option to 0.
- * src/Util.cc
- (fileChecksum): Removed the call to ctx.digestReset().
-
- 2006-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * po/ru.po: Azamat sent me Russian translation.
-
- * src/FtpNegotiateCommand.cc
- (recvGreeting): Call disableWriteCheckSocket just after
- socket->setBlockingMode(). This avoids unnecessary CPU-hog loop.
- (recvRetr): Recognized status code 125 as a acceptable response code.
-
- Rename Time.h to TimeA2.h to avoid compilation ploblem on
- case-insesitive filesystem(BUG#1531057).
- * src/Time.h: Renamed as TimeA2.h.
- * src/Time.cc: Renamed as TimeA2.cc.
- * src/TimeA2.h: New class.
- * src/TimeA2.cc: New class.
- * src/PeerChokeCommand.h: Replaced Time.h with TimeA2.h.
- * src/TrackerWatcherCommand.h: Replaced Time.h with TimeA2.h.
- * src/PeerAbstractCommand.h: Replaced Time.h with TimeA2.h.
- * src/AbstractCommand.h: Replaced Time.h with TimeA2.h.
- * src/PeerInteractionCommand.h: Replaced Time.h with TimeA2.h.
- * src/ConsoleDownloadEngine.h: Replaced Time.h with TimeA2.h.
- * src/TorrentAutoSaveCommand.h: Replaced Time.h with TimeA2.h.
- * src/DownloadCommand.h: Replaced Time.h with TimeA2.h.
- * src/TorrentMan.h: Replaced Time.h with TimeA2.h.
- * src/TorrentDownloadEngine.h: Replaced Time.h with TimeA2.h.
- * src/RequestSlot.h: Replaced Time.h with TimeA2.h.
- * src/SleepCommand.h: Replaced Time.h with TimeA2.h.
- * src/DownloadEngine.cc: Replaced Time.h with TimeA2.h.
- * release 0.7.0
-
- 2006-08-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/PeerChokeCommand.h
- (PeerChokeCommand): Rearranged the arguments.
- * src/PeerChokeCommand.cc
- (PeerChokeCommand): Rearranged the arguments.
- * src/MetalinkEntry.h
- (Checksum.h): Included.
- (md5): Removed.
- (sha1): Removed.
- (checksum): New variable.
- (operator=): Updated.
- (check): Removed.
- * src/prefs.h
- (PREF_LOWEST_SPEED_LIMIT): New definition.
- (PREF_FOLLOW_TORRENT): New definition.
- (PREF_SELECT_FILE): New definition.
- (PREF_FOLLOW_METALINK): New definition.
- * src/MetalinkResource.h
- (TYPE_HTTPS): Added to enum TYPE.
- * src/TorrentMan.cc
- (~TorrentMan): Rewritten.
- * src/MultiDiskWriter.cc
- (MultiDiskAdaptor): Updated according to the changes in
- MessageDigestContext.
- (~MultiDiskAdaptor): Updated according to the changes in
- MessageDigestContext.
- (hashUpdate): Updated according to the changes in MessageDigestContext.
- (sha1Sum): Updated according to the changes in MessageDigestContext.
- * src/Util.h
- (fileChecksum): Updated according to the changes in
- MessageDigestContext.
- * src/Util.cc
- (sha1Sum): Updated according to the changes in MessageDigestContext.
- (fileChecksum): Updated according to the changes in
- MessageDigestContext.
- * src/messageDigest.h: Rewritten.
- * src/MetalinkEntry.cc
- (check): Removed.
- (Supported): Updated.
- (dropUnsupportedResource): Fixed a memory leak.
- * src/ShaVisitor.cc
- (ShaVisitor): Updated according to the changes in MessageDigestContext.
- (~ShaVisitor): Updated according to the changes in
- MessageDigestContext.
- (visit): Updated according to the changes in MessageDigestContext.
- * src/main.cc
- (main): Rewritten the portion of download loop. --lowest-speed-limit
- command-line option added.
- * src/DownloadEngine.h
- (SocketEntry): New class.
- (SocketEntries): New definition.
- (PairFind): Removed.
- (SockCmdMap): Removed.
- * src/DownloadEngine.cc
- (DownloadEngine): Rewritten.
- (~DownloadEngine): Rewritten.
- (run): Renamed activeCommandUuids as activeUuids.
- (SetDescriptor): Rewritten.
- (AccumulateActiveCommandUuid): Removed.
- (AccumulateActiveUuid): New function object.
- (waitData): Rewritten.
- (updateFdSet): Rewritten.
- (addSocket): Rewritten.
- (deleteSocket): Rewritten.
- (addSocketForReadCheck): Rewritten.
- (deleteSocketForReadCheck): Rewritten.
- (addSocketForWriteCheck): Rewritten.
- (deleteSocketForWriteCheck): Rewritten.
-
- * src/Xml2MetalinkProcessor.cc
- (getEntry): Rewritten the portion of MetalinkEntry creation.
- * src/DownloadCommand.cc
- (executeInternal): Added the check routine for lowest speed limit.
- * src/AbstractDiskWriter.cc
- (AbstractDiskWriter): Updated according to the changes in
- MessageDigestContext.
- (~AbstractDiskWriter): Updated according to the changes in
- MessageDigestContext.
- (sha1Sum): Updated according to the changes in MessageDigestContext.
- * src/RequestInfo.h: New class.
- * src/UrlRequestInfo.h: New class.
- * src/UrlRequestInfo.cc: New class.
- * src/TorrentRequestInfo.h: New class.
- * src/TorrentRequestInfo.cc: New class.
- * src/MetalinkRequestInfo.h: New class.
- * src/MetalinkRequestInfo.cc: New class.
- * src/Checksum.h: New class.
- * src/DownloadEngineFactory.h: New class.
- * src/DownloadEngineFactory.cc: New class.
-
- 2006-08-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/Option.h
- (getAsBool): New function.
- * src/Option.cc
- (prefs.h): Included.
- (defined): 0-length value is now recognized as undefined.
- (getAsInt): Rewritten.
- (getAsLLInt): Rewritten.
- (getAsBool): New function.
-
- * src/FeatureConfig.h: Rewritten.
- * src/FeatureConfig.cc: Rewritten.
- * src/prefs.h
- (PREF_STDOUT_LOG): New definition.
- (PREF_LOG): New definition.
- (PREF_DIR): New definition.
- (PREF_OUT): New definition.
- (PREF_SPLIT): New definition.
- (PREF_DAEMON): New definition.
- (PREF_REFERER): New definition.
- (PREF_TORRENT_FILE): New definition.
- (PREF_LISTEN_PORT): New definition.
- (PREF_METALINK_FILE): New definition.
- (PREF_METALINK_VERSION): New definition.
- (PREF_METALINK_LANGUAGE): New definition.
- (PREF_METALINK_OS): New definition.
- (PREF_METALINK_SERVERS): New definition.
- * src/main.cc
- (main): Following command-line parameters are now put into Option
- class: stdoutLog, logfile, dir, ufilename, split, daemonMode,
- referer, torrentFile, metalinkFile, listenPort, metalinkVersion,
- metalinkLanguage, metalinkOs, metalinkServers
-
- To fix the bug that aria2 can not handle http response header properly.
-
- * src/HttpHeader.cc
- (put): Made name lowercased.
- (defined): Made name lowercased.
- (getFirst): Made name lowercased.
- (get): Made name lowercased.
- (getFirstAsInt): Rewritten.
- (getFirstAsLLInt): Rewritten.
- 2006-07-30 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/TorrentMan.h:
- (advertisePiece): Updated doc.
- (getAdvertisedPieceIndexes): Updated doc.
- (removeAdvertisedPiece); New function.
-
- * src/TorrentMan.cc
- (FindElapsedHave): New function object.
- (removeAdvertisedPiece): New function.
- * src/HaveEraseCommand.h: New class.
- * src/HaveEraseCommand.cc: New class.
- * src/FeatureConfig.h: New class.
- * src/FeatureConfig.cc: New class.
-
- * src/Request.h
- (defaultPorts): Removed.
- * src/Request.cc
- (FeatureConfig.h): Included.
- (Request): Removed the statements related to defaultPorts.
- (parseUrl): Removed metalinkEnabled. Use FeatureConfig instead.
- A default port number is now retrieved from FeatureConfig.
-
- * src/main.cc
- (HaveEraseCommand.h): Included.
- (showVersion): Added the output of feature list.
- (main): Added HaveEraseCommand to command queue in BitTorrent
- downloading.
-
- * src/PeerInteractionCommand.h
- (chokeCheckPoint): Commented out.
- (periodicExecPoint): New variable.
- * src/PeerInteractionCommand.cc
- (executeInternal): Following methods are now called in at least every
- 0.5 seconds to reduce CPU usage:
- detectMessageFlooding(), peerInteraction->checkRequestSlot(),
- checkHave(), sendKeepAlive().
- (checkLongTimePeerChoking): Commented out.
- * src/BitfieldMan.h
- (getNthBitIndex): Changed the method signature.
- (getMissingIndexRandomly): Changed the method signature.
- * src/BitfieldMan.cc
- (getNthBitIndex): Rewritten
- (getMissingIndexRandomly): Rewritten.
- (hasMissingPiece): Rewritten.
- (getMissingIndex): Refactored.
- (getMissingUnusedIndex); Refactored.
- (getMissingIndex): Refactored.
-
- 2006-07-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/PeerMessage.h
- (Piece.h): Included.
- (SharedHandle.h): Included.
- (invalidate): New variable.
- (uploading): New variable.
- (isInvalidate): New function.
- (isUploading): New function.
- (onPush): New function.
- (onChoked): New function.
- (onCanceled): New function.
- (onAbortPiece): New function.
- (PeerMessageHandle): New type definition.
-
- * src/PeerMessage.cc
- (PeerMessage): Added the initialization for invalidate and uploading.
-
- * src/CancelMessage.h
- (CancelMessage): Rewritten.
- * src/RejectMessage.h
- (RejectMessage): Rewritten.
- * src/Metalinker.h
- (operator=): Defined.
-
- * src/MetaEntry.h
- (operator=): Defined.
- * src/MetalinkResource.h
- (operator=): Defined.
-
- * src/AllowedFastMessage.h
- (AllowedFastMessage): Rewritten.
- * src/HandshakeMessage.h
- (HandshakeMessage): New function(overload).
-
- * src/HandshakeMessage.cc
- (HandshakeMessage): Rewritten.
- (init): New function.
- * src/HaveMessage.h
- (HaveMessage): Rewritten.
-
- * src/Time.h
- (operator=): Defined the function body here.
- * src/Time.cc
- (operator=): Removed.
-
- * src/SocketCore.h
- (operator==): Defined here.
- (operator!=): Defined here.
- (operator<): Defined here.
- * src/SocketCore.cc
- (operator==): Removed.
- (operator<): Removed.
- * src/BitfieldMan.h
- (operator=): Defined the function body here.
- * src/BitfieldMan.cc
- (operator=): Removed.
- * src/TorrentMan.h
- (deleteErrorPeer): Removed.
- (deleteUnusedPeer); New function.
- * src/TorrentMan.cc
- (addPeer): Call deleteUnusedPeer.
- (deleteErrorPeer): Removed.
- (deleteUnusedPeer): New function.
- * src/PeerAbstractCommand.h
- (setNoCheck): New function.
- (noCheck): New variable.
- * src/PeerAbstractCommand.cc
- (PeerAbstractCommand): Added the initialization of noCheck.
- (execute): Added a check for noCheck.
- (setNoCheck): New function.
- * src/Util.h
- (stdio.h): Included.
- * src/Util.cc
- (unistd.h): Included.
- * src/DefaultDiskWriter.cc
- (unistd.h): Included.
- * src/Peer.h
- (operator==): Defined the function body here.
- (operator!=): Defined the function body here.
- * src/Peer.cc
- (operator==): Removed.
- (operator!=): Removed.
- * src/Piece.h
- (Piece): Defined the function body here(copy constructor).
- (operator=): Defined the function body here.
- (operator==): Defined the function body here.
- * src/Piece.cc
- (Piece): Removed(copy constructor).
- (operator=): Removed.
- (operator==): Removed.
-
- * src/PeerMessageUtil.h
- (ChokeMessage.h): Removed.
- (UnchokeMessage.h): Removed.
- (InterestedMessage.h): Removed.
- (NotInterestedMessage.h): Removed.
- (HaveMessage.h): Removed.
- (BitfieldMessage.h): Removed.
- (RequestMessage.h): Removed.
- (CancelMessage.h): Removed.
- (PieceMessage.h): Removed.
- (HandshakeMessage.h): Removed.
- (KeepAliveMessage.h): Removed.
- (PortMessage.h): Removed.
- (HaveAllMessage.h): Removed.
- (HaveNoneMessage.h): Removed.
- (PeerConnection.h): Removed.
- (HandshakeMessage.h): Included.
- * src/BitfieldMessage.h
- (init): New function.
- (BitfieldMessage): Rewritten.
- (BitfieldMessage): New function(overload).
- * src/RequestSlot.h
- (operator=): Defined the function body here.
- (operator==): Defined the function body here.
- * src/RequestSlot.cc
- (operator=): Removed.
- (operator==): Removed.
-
- To remove the dependency on the PeerMessage subclass from
- PeerInteraction:
- * src/PeerMessageFactory.h: New class.
- * src/PeerMessageFactory.cc: New class.
- * src/SimplePeerMessage.cc
- (send): If invalidate is true then do nothing.
- * src/PeerInteractionCommand.cc
- (HandshakeMessage.h): Included.
- (KeepAliveMessage.h): Included.
- (ChokeMessage.h): Included.
- (UnchokeMessage.h): Included.
- (HaveMessage.h): Included.
- (executeInternal): Call setNoCheck().
- Removed setWriteCheckSocket(socket).
- * src/PeerInteraction.h
- (ChokeMessage.h): Removed.
- (UnchokeMessage.h): Removed.
- (InterestedMessage.h): Removed.
- (NotInterestedMessage.h): Removed.
- (HaveMessage.h): Removed.
- (BitfieldMessage.h): Removed.
- (RequestMessage.h): Removed.
- (CancelMessage.h): Removed.
- (PieceMessage.h): Removed.
- (HandshakeMessage.h): Removed.
- (KeepAliveMessage.h): Removed.
- (PortMessage.h): Removed.
- (HaveAllMessage.h): Removed.
- (HaveNoneMessage.h): Removed.
- (RejectMessage.h): Removed.
- (AllowedFastMessage.h): Removed.
- (SuggestPieceMessage.h): Removed.
- (PeerMessageFactory.h): Included.
- (PeerMessageHandle): Removed typedef of PeerMessageHandle.
- (HandshakeMessageHandle): Removed typedef of HandshakeMessageHandle.
- (PeerMessageFactory): New variable.
- (createPeerMessage): Removed.
- (createHandshakeMessage): Removed.
- (setPeerMessageCommonProperty): Removed.
- (addRequestSlot): New function.
- (receiveHandshake): Changed the return value type to PeerMessageHandle.
- (getPeerMessageFactory): New function.
- (createRequestMessage): Removed.
- (createCancelMessage): Removed.
- (createPieceMessage): Removed.
- (createHaveMessage): Removed.
- (createChokeMessage): Removed.
- (createUnchokeMessage): Removed.
- (createInterestedMessage): Removed.
- (createNotInterestedMessage): Removed.
- (createBitfieldMessage): Removed.
- (createKeepAliveMessage): Removed.
- (createHaveAllMessage): Removed.
- (createHaveNoneMessage): Removed.
- (createRejectMessage): Removed.
- (createAllowedFastMessage): Removed.
- * src/PeerInteraction.cc
- (PeerInteraction): Allocate PeerMessageFactory here.
- (~PeerInteraction): Deallocate PeerMessageFactory here.
- (sendMessages): Use msg->isUploading() instead of msg->getId() ==
- PieceMessage::ID.
- (addMessage): Simplified by using PeerMessage::onPush().
- (addRequestSlot): New function.
- (rejectAllPieceMessageInQueue): Simplified by using
- PeerMessage::onChoked().
- (rejectPieceMessageInQueue): Simplified by using
- PeerMessage::onCanceled().
- (abortPiece): Simplified by using PeerMessage::abortPiece().
- (receiveHandshake): Changed the return value type to PeerMessageHandle.
- (createHandshakeMessage): Removed.
- (createPeerMessage): Removed.
- (sendHandshake): Call PeerMessageFactory::createHandshakeMessage().
- (setPeerMessageCommonProperty): Removed.
- (createRequestMessage): Removed.
- (createCancelMessage): Removed.
- (createPieceMessage): Removed.
- (createHaveMessage): Removed.
- (createChokeMessage): Removed.
- (createUnchokeMessage): Removed.
- (createInterestedMessage): Removed.
- (createNotInterestedMessage): Removed.
- (createBitfieldMessage): Removed.
- (createKeepAliveMessage): Removed.
- (createHaveAllMessage): Removed.
- (createHaveNoneMessage): Removed.
- (createRejectMessage): Removed.
- (createAllowedFastMessage): Removed.
- * src/PieceMessage.h
- (createRejectMessage): New function.
- (PieceMessage): Rewritten.
- (onChoked): New function.
- (onCanceled): New function.
- * src/PieceMessage.cc
- (send): If invalidate is true then do nothing, just return.
- (createRejectMessage): New function.
- (onChoked): New function.
- (onCanceled): New function.
- * src/RequestMessage.h
- (RequestMessage): Rewritten.
- (onPush): New function.
- (onAbortPiece): New function.
- * src/RequestMessage.cc
- (onPush): New function.
- (onAbortPiece): New function.
-
- Update fd_set when a socket is added or deleted in order to improve
- performance:
- * src/DownloadEngine.h
- (rfdset): New variable.
- (wfdset): New variable.
- (updateFdSet): New function.
- * src/DownloadEngine.cc
- (SetDescriptor::operator()): Use SockCmdMap::value_type.
- (AccumulateActiveCommandUuid::operator()): Use SockCmdMap::value_type.
- (waitData): Copy rfdset and wfdset.
- (updateFdSet): New function.
- (addSocket): Call updateFdSet.
- (deleteSocket): Call updateFdSet.
-
- 2006-07-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To add the support for Metalink3.0 backward compatible links:
-
- * src/Request.h
- (SAFE_CHARS): Added '#'.
- (METALINK_MARK): New definition.
- * src/Request.cc
- (parseUrl): Added the support for Metalink3.0 backward compatible
- links.
- etc
- * src/PeerInteraction.cc
- (MsgPushBack): Removed.
- (sendMessages): Use STL copy and back_inserter.
- (rejectAllPieceMessageInQueue): Use STL copy and back_inserter.
- (rejectPieceMessageInQueue): Use STL copy and back_inserter.
- * src/TorrentMan.h
- (MAX_PEER_LIST_SIZE): Changed to 100 from 250.
-
- 2006-07-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/SharedHandle.h: New class.
- To wrap Socket, Command, PeerMessage and Peer with SharedHandle:
- * src/HttpResponseCommand.h
- (HttpResponseCommand): Wrapped Socket.
- * src/SocketCore.h
- (operator==): New function.
- (operator!=): New function.
- (operator<): New function.
- (getSockfd): New function.
- (isOpen): New function.
- (writeData): New function.
- * src/SocketCore.cc
- (operator==): New function.
- (operator!=): New function.
- (operator<): New function.
- * src/AbstractCommand.h
- (socket): Changed its type to SocketHandle.
- (setReadCheckSocket): Replaced Socket with SocketHandle.
- (setWriteCheckSocket): Replaced Socket with SocketHandle.
- (disableReadCheckSocket): New function.
- (disableWriteCheckSocket): New function.
- (readCheckTarget): Changed its type to SocketHandle.
- (writeCheckTarget): Changed its type to SocketHandle.
- (AbstractCommand): Replaced Socket with SocketHandle.
- * src/AbstractCommand.cc
- (AbstractCommand): Replaced Socket with SocketHandle.
- (~AbstractCommand): Removed the deallocation for Socket object.
- (disableReadCheckSocket): New function.
- (setReadCheckSocket): Replaced Socket with SocketHandle.
- (disableWriteCheckSocket): New function.
- (setWriteCheckSocket): Replaced Socket with SocketHandle.
- * src/HttpDownloadCommand.cc
- (DownloadCommand): Replaced Socket with SocketHandle.
- * src/PeerAbstractCommand.h
- (socket): Changed its type to SocketHandle.
- (peer): Changed its type to PeerHandle.
- (setReadCheckSocket): Replaced Socket with SocketHandle.
- (setWriteCheckSocket): Replaced Socket with SocketHandle.
- (disableReadCheckSocket): New function.
- (disableWriteCheckSocket): New function.
- (readCheckTarget): Changed its type to SocketHandle.
- (writeCheckTarget): Changed its type to SocketHandle.
- (PeerAbstractCommand): Replaced Socket with SocketHandle.
- Replaced Peer with PeerHandle.
- * src/HttpRequestCommand.cc
- (HttpRequestCommand): Replaced Socket with SocketHandle.
- Use disableReadCheckSocket.
- * src/PeerInitiateConnectionCommand.h
- (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
- * src/PeerChokeCommand.cc
- (UploadFaster::operator()): Replaced Peer with PeerHandle.
- (DownloadFaster::operator()): Replaced Peer with PeerHandle.
- (execute): Use PeerHandle.
- * src/PeerConnection.h
- (HandshakeMessage.h): Removed include of HandshakeMessage.h.
- (socket): Changed its type to SocketHandle.
- (PeerConnection): Replaced Socket with SocketHandle.
- * src/PeerConnection.cc
- (PeerConnection): Replaced Socket with SocketHandle.
- * src/PeerInteractionCommand.h
- (PeerInteractionCommand): Replaced socket with SocketHandle.
- Replaced Peer with PeerHandle.
- * src/PeerInteractionCommand.cc
- (PeerInteractionCommand): Replaced Socket with SocketHandle.
- Replaced Peer with PeerHandle.
- (executeInternal): Use disableWriteCheckSocket.
- Use HandshakeMessageHandle.
- (receiveMessages): Use PeerMessageHandle.
- (prepareForNextPeer): Use PeerHandle.
- * src/HttpProxyRequestCommand.h
- (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
- * src/HttpResponseCommand.cc
- (HttpResponseCommand): Replaced Socket with SocketHandle.
- * src/TorrentMan.cc
- (nullPeer): Added external reference.
- (~TorrentMan): Removed the deallocation of the elements of peers.
- (addPeer): Rewritten.
- (isPeerAvailable): Use nullPeer.
- (deleteOldpeers): Replaced with deleteErrorPeer.
- (deleteErrorPeer): New function.
- (getPeer): Use PeerHandle and nullPeer.
- (hasMissingPiece): Replaced Peer with PeerHandle.
- (getMissingPieceIndex): Replaced Peer with PeerHandle.
- (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
- (getMissingFastPiece): Replaced Peer with PeerHandle.
- (getMissingPiece): Replaced Peer with PeerHandle.
- * src/FtpNegotiateCommand.cc
- (FtpNegotiationCommand): Replaced Peer with PeerHandle.
- (~FtpNegotiationCommand): Removed the deallocation of Sockets.
- (recvGreeting): Use disableWriteCheckSocket.
- (recvPasv): Removed the allocation of Socket.
- Use disableReadCheckSocket.
- (sendRestPasv): Use disableWriteCheckSocket.
- (recvRetr): Changed assertion.
- * src/PeerInteraction.h
- (SharedHandle.h): Included SharedHandle.h.
- (PeerMessageHandle): New type definition.
- (HandshakeMessageHandle): New type definition.
- (MessageQueue): Changed. Now its element is of type PeerMessageHandle.
- (peer): Changed its type to PeerHandle.
- (createHandshakeMessage): Replaced HandshakeMessage with
- HandshakeMessageHandle.
- (createPeerMessage): Replaced PeerMessageHandle with PeerMessage.
- (PeerInteraction): Replaced Peer with PeerHandle.
- Replaced Socket with SocketHandle.
- (addMessage): Replaced PeerMessage with PeerMessageHandle.
- (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
- (receiveHandshake): Replaced HandshakeMessage with
- HandshakeMessageHandle.
- * src/PeerInteraction.cc
- (PeerInteraction): Replaced Peer with PeerHandle.
- Replaced Socket with SocketHandle.
- (~PeerInteraction): Removed the deallocation of the elements of
- messageQueue.
- (MsgPushBack::operator()): Replaced PeerMessage with PeerMessageHandle.
- (isSendingMessageInProgress): Replaced PeerMessage with
- PeerMessageHandle.
- (sendMessages): Use PeerMessageHandle. Removed try-catch block.
- (addMessage): Replaced PeerMessage with PeerMessageHandle.
- (rejectAllPieceMessageInQueue): Use PeerMessageHandle.
- (rejectPieceMessageInQueue): Use PeerMessageHandle.
- (abortPiece): Use PeerMessageHandle.
- (receiveHandshake): Replaced HandshakeMessage with
- HandshakeMessageHandle. Removed try-catch block.
- (createHandshakeMessage): Replaced HandshakeMessage with
- HandshakeMessageHandle.
- (receiveMessage): Replaced PeerMessage with PeerMessageHandle.
- Removed try-catch block.
- (createPeerMessage): Replaced PeerMessage with PeerMessageHandle.
- * src/HttpProxyResponseCommand.cc
- (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
- * src/FtpTunnelResponseCommand.h
- (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
- * src/HttpConnection.cc
- (HttpConnection): Replaced Socket with SocketHandle.
- * src/PeerAbstractCommand.cc
- (PeerAbstractCommand): Replaced Socket with SocketHandle.
- (~PeerAbstractCommand): Removed the deallocation of socket.
- Use disableReadCheckSocket, disableWriteCheckSocket.
- (disableReadCheckSocket): New function.
- (setReadCheckSocket): Replaced Socket with SocketHandle.
- (disableWriteCheckSocket): New function.
- (setWriteCheckSocket): Replaced Socket with SocketHandle.
- * src/InitiateConnectionCommandFactory.h: Corrected indentation.
- * src/FtpTunnelRequestCommand.cc
- (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
- (~FtpTunnelRequestCommand): Corrected indentation.
- * src/DownloadCommand.h
- (DownloadCommand): Replaced Socket with SocketHandle.
- * src/PeerListenCommand.cc
- (PeerListenCommand): Removed the initialization of socket.
- (~PeerListenCommand): Removed the deallocation of socket.
- (bindPort): Use SocketHandle.
- (execute): Use SocketHandle and PeerHandle.
- * src/FtpDowndloadCommand.cc
- (FtpDownloadCommand): Replaced Socket with SocketHandle.
- (~FtpDownloadCommand): Removed the deallocation of ctrlSocket.
- * src/main.cc
- (main): Corrected indentation.
- * src/HttpInitiateConnectionCommand.cc
- (HttpInitiateConnectionCommand): Replaced Socket with SocketHandle.
- (executeInternal): Removed the allocation of socket.
- * src/HttpRequestCommand.h
- (HttpRequestCommand): Replaced Socket with SocketHandle.
- * src/FtpNegotiationCommand.h
- (dataSocket): Changed its type to SocketHandle.
- (serverSocket): Changed its type to SocketHandle.
- (FtpNegotiationCommand): Replaced Socket with SocketHandle.
- * src/TorrentMan.h
- (MAX_PEER_UPDATE): Removed.
- (MAX_PEERS): New definition.
- (Peers): The element is now of type PeerHandle.
- (addPeer): Replaced Peer with PeerHandle. Removed 'duplicate' argument.
- (getPeer): Replaced Peer with PeerHandle.
- (deleteOldErrorPeers): Removed.
- (deleteErrorPeer): New function.
- (hasMissingPiece): Replaced Peer with PeerHandle.
- (getMissingPieceIndex): Replaced Peer with PeerHandle.
- (getMissingPiece): Replaced Peer with PeerHandle.
- (getMissingFastPieceIndex): Replaced Peer with PeerHandle.
- (getMissingFastPiece): Replaced Peer with PeerHandle.
- (addActivePeer): Replaced Peer with PeerHandle.
- (deleteActivePeer): Replaced Peer with PeerHandle.
- Added a check for the return value of find.
- * src/FtpTunnelResponseCommand.cc
- (FtpTunnelResponseCommand): Replaced Socket with SocketHandle.
- * src/FtpInitiateConnectionCommand.cc
- (executeInternal): Removed the allocation of socket.
- * src/DownloadEngine.h
- (Sockets): An element is now of type SocketHandle.
- (SockCmdMap): A key is of type SocketHandle, a value is of type int.
- (CommandUuids): New type definition.
- (rsockets): Changed its type to SockCmdMap.
- (wsockets): Changed its type to SockCmdMap.
- (addSocket): Rewritten.
- (deleteSocket): Rewritten.
- (addSocketForReadCheck): Rewritten.
- (deleteSocketForReadCheck): Rewritten.
- (addSocketForWriteCheck): Rewritten.
- (deleteSocketForWriteCheck): Rewritten.
- (PairFind): New template class.
- * src/HttpDownloadCommand.h
- (HttpDownloadCommand): Replaced Socket with SocketHandle.
- * src/FtpConnection.cc
- (FtpConnection): Replaced Socket with SocketHandle.
- (sendPort): Removed the allocation of serverSocket. Removed try-catch
- block.
- * src/InitiateConnectionCommandFactory.cc
- (DlAbortEx.h): Included DlAbortEx.h.
- (createInitiateConnectionCommand): Throw exception if the protocol of
- requested URI is not supported.
- * src/Peer.cc
- (nullPeer): Changed its type to PeerHandle.
- (operator==): New function.
- (operator!=): New function.
- * src/Peer.h
- (SharedHandle.h): Included SharedHandle.h.
- (operator==): New function.
- (operator!=): New function.
- (Peer): Added the default constructor.
- Use resetStatus() to initialize member variables.
- (nullPeer): Removed.
- * src/TrackerUpdateCommand.cc
- (execute): Brushed up using SharedHandle. Replaced MAX_PEER_UPDATE
- with MIN_PEERS.
- * src/PeerListenCommand.h
- (socket): Changed its type to SocketHandle.
- * src/Command.h
- (CommandUuid): New type definition.
- (uuid): New variable.
- (uuidGen): New variable.
- (Command): Added the initialization of uuid.
- (getUuid): New function.
- * src/Socket.h
- (Socket): Removed.
- (SocketHandle): New type definition.
- * src/DownloadEngine.h
- (FindCommand): New function object.
- (run): The portion of socket check was rewritten.
- (SetDescriptor): New function object.
- (AccumulateActiveCommandUuid): New function object.
- (waitData): Rewritten.
- (addSocket): Rewritten.
- (deleteSocket): Rewritten.
- (addSocketForReadCheck): Rewritten.
- (addSocketForWriteCheck): Rewritten.
- (deleteSocketForReadCheck): Rewritten.
- (deleteSocketForWriteCheck): Rewritten.
- * src/HttpProxyResponseCommand.h
- (HttpProxyResponseCommand): Replaced Socket with SocketHandle.
- * src/HttpConnection.h
- (socket): Changed its type to SocketHandle.
- (HttpConnection): Replaced Socket with SocketHandle.
- * src/PeerInitiateConnectionCommand.cc
- (PeerInitiateConnectionCommand): Replaced Peer with PeerHandle.
- (executeInternal): Removed the allocation of socket.
- (prepareForNextPeer): Use PeerHandle.
- * src/PeerMessage.h
- (peer): Changed its type to PeerHandle.
- (getPeer): Replaced Peer with PeerHandle.
- (setPeer): Replaced Peer with PeerHandle.
- * src/DownloadCommand.cc
- (DownloadCommand): Replaced Socket with SocketHandle.
- * src/FtpConnection.h
- (socket): Changed its type to SocketHandle.
- (FtpConnection): Replaced Socket with SocketHandle.
- (sendPort); Replaced Socket with SocketHandle.
- * src/FtpDowndloadCommand.h
- (ctrlSocket): Changed its type to SocketHandle.
- (FtpDownloadCommand): Replaced Socket with SocketHandle.
- * src/HttpProxyRequestCommand.cc
- (HttpProxyRequestCommand): Replaced Socket with SocketHandle.
- * src/FtpTunnelRequestCommand.h
- (FtpTunnelRequestCommand): Replaced Socket with SocketHandle.
-
- etc
-
- * src/PeerChokeCommand.h
- (setAllPeerChoked): Removed.
- (setAllPeerResetDelta): Removed.
- * src/PeerChokeCommand.cc
- (setAllPeerChoked): Removed.
- (ChokePeer): New function object.
- (setAllPeerResetDelta): Removed.
- (ResetDelta): New function object.
- (orderByDownloadRate): Fixed a bug: use DowloadFaster, not UploadFaster
- (execute): Show download speed when the local node is a seeder.
- setAllPeerChoked and setAllPeerResetDelta were rewritten
- using STL.
- * src/TrackerWatcherCommand.h
- (MIN_PEERS): Removed.
- * src/TorrentMan.cc
- (getPeer): Replaced MAX_PEER_UPDATE with MIN_PEERS.
-
- 2006-07-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To fix the bug that .aria2 file is not saved if downloading is stopped
- by the errors:it results that aria2 can not resume downloading:
-
- * src/main.cc
- (normalDownload): Added the call to save().
- (main): Added the deletion of the elements in 'reserved'.
- To fix log:
- * src/PeerInteraction.cc
- (receiveHandshake): Fixed log.
- 2006-07-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To improve download performance in BitTorrent:
-
- * src/TorrentMan.cc
- (getPeer): Check the number of connections. Return nullPeer if
- it is greater than MAX_PEER_UPDATE.
- This code was originally here, but was removed in 0.5.1.
- 2006-07-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To improve the conditional compilation:
- * src/MultiDiskWriter.h:
- Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
- * src/MultiDiskWriter.cc:
- Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
- * src/Util.h:
- Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
- Added ENABLE_BITTORRENT around computeFastSet().
- * src/Util.cc:
- Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
- Added ENABLE_BITTORRENT around computeFastSet().
- * src/messageDigest.h:
- Replaced ENABLE_BITTORRENT with ENABLE_SSL.
- * src/ShaVisitor.h:
- Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
- * src/ShaVisitor.cc:
- Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
- * src/main.cc:
- Added ENABLE_BITTORRENT around includes and blocks related to
- BitTorrent.
- Added ENABLE_MESSAGE_DIGEST to skip checksum checking when the message
- digest support is not available.
- * src/AbstractDiskWriter.h:
- Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
- * src/AbstractDiskWriter.cc:
- Replaced ENABLE_SHA1DIGEST with ENABLE_MESSAGE_DIGEST.
- * src/MetalinkEntry.cc
- (check): Added ENABLE_MESSAGE_DIGEST. Return true if the message digest
- support is not available.
-
- To add command-line options for Metalink:
- * src/main.cc:
- Added metalink-version, metalink-language, metalink-os,
- follow-metalink.
- To use EXIT_SUCCESS and EXIT_FAILURE with exit():
- * src/main.cc: Use these definition.
- * Release 0.6.0
-
- 2006-07-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To add Metalink support(http/ftp only):
- * src/AbstractCommand.h
- (tryReserved): New function.
- * src/AbstractCommand.cc
- (execute): Call tryReserved().
- (tryReserved): New function.
- * src/Request.h
- (Requests): New type definition.
- * src/SegmentMan.h
- (reserved): New variable.
- * src/Util.h
- (fileChecksum): New function.
- (toUpper): New function.
- (toLower): New function.
- * src/Util.cc
- (messageDigest.h): Included.
- (trim): Trim \r\n\t.
- (fileChecksum): New function.
- (toUpper): New function.
- (toLower): New function.
- * src/main.cc
- (normalDownload): New function.
- (main): Added 2 command-line options: metalink-file,
- metalink-connection. Their usage has not been written yet.
- * src/MetalinkProcessor.h: New class.
- * src/Xml2MetalinkProcessor.h: New class.
- * src/Xml2MetalinkProcessor.cc: New class.
- * src/MetalinkEntry.h: New class.
- * src/MetalinkEntry.cc: New class.
- * src/MetalinkResource.h: New class.
- * src/MetalinkResource.cc: New class.
-
- To add md5 message digest checking:
- * src/messageDigest.h: Rewritten.
- * src/MultiDiskWriter.cc: Updated according to the changes in
- messageDigest.h.
- * src/ShaVisitor.cc: Updated according to the changes in
- messageDigest.h.
- * src/Util.cc: Updated according to the changes in messageDigest.h.
- * src/AbstractDiskWriter.cc: Updated according to the changes in
- messageDigest.h.
-
- To fix a bug that causes segfault when the payload length in peer
- message is less than 0:
- * src/PeerConnection.cc:
- (receiveMessage): Fixed the bug.
- * src/PeerMessageUtil.cc
- (checkLength): Throw an exception if length is less than or equals to
- 0.
-
- To add new interfaces to Base64 encoding/decoding:
- * src/Base64.h
- (part_encode): Changed the method signature.
- (encode): New function(overload).
- (decode): New function(overload).
- * src/Base64.cc
- (part_encode): Rewritten.
- (encode): Rewritten.
- (encode): New function(overload).
- To prevent a peer to download same piece if there is an error in
- checksum:
- * src/PieceMessage.cc
- (receivedAction): Call peerInteraction->abortPiece().
-
- 2006-06-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To fix the bug that causes same have message is sent many times to
- a single peer.
- * src/Time.cc
- (isNewer): Use Util::difftv().
- * src/Util.cc
- (difftv): Added a cast to (long long int).
- * src/TorrentMan.cc
- (advertisePiece): Use push_front.
- (getAdvertisedPieceIndexes): A performance improvement was made.
-
- To fix the bug that sends tracker requests without a sleep interval
- when the number of connections is less than 15.
- * src/TrackerWatcherCommand.cc
- (execute): Now the number of connections is not a factor to decide
- whether or not a tracker request should be sent or not.
- * src/Time.h
- (setTimeInSec): New function.
- * src/Time.cc
- (setTimeInSec): New function.
- etc.
-
- * src/ChokeMessage.cc
- (receivedAction): Removed peer->snubbing = false
- * src/PeerConnection.h
- (receiveHandshake): Updated doc.
- * src/TorrentMan.h
- (getAdvertisedPieceIndexes): Updated the method signature.
- * src/TorrentMan.cc
- (getAdvertisedPieceIndexes): Updated the method signature.
- * src/Time.h
- (getTimeInMicros): Added a cast to (long long int).
- (getTimeInMillis): Added a cast to (long long int).
-
- * Release 0.5.2
-
- 2006-06-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To make a listening socket non-block:
-
- * src/SocketCore.h
- (setNonBlockingMode): New function.
- * src/SocketCore.cc
- (setNonBlockingMode): New function.
- (beginListen): Added a call to setNonBlockingMode().
- (acceptConnection): Call setNonBlockingMode().
- (setBlockingMode): Updated.
- To handle tracker's NAT-checking:
-
- * src/PeerConnection.cc
- (receiveHandshake): 'msg' param is filled with received data and
- its length is assigned to 'length' param, even if all handshake
- message is not yet received.
- * src/PeerInteractionCommand.cc
- (executeInternal): Use peerInteraction->receiveHandshake(true) when
- a new peer connects to localhost.
- A call to peerInteraction->sendHandshake() was removed because
- it is called from peerInteraction->receiveHandshake(true).
- * src/PeerInteraction.h
- (quickReplied): New variable.
- (receiveHandshake): Added an argument.
- * src/PeerInteraction.cc
- (PeerInteraction): Added the initialization of quickReplied.
- (receiveHandshake): Send handshake message as soon as the info hash
- in a handshake message from a peer is correct.
-
- To change the random part of peer id and key parameter:
- * src/TorrentMan.h
- (key): New variable.
- * src/TorrentMan.cc
- (setupInternal1): Use Util::randomAlpha() to generate random part
- of peer id, which is now "-aria2-"+13 alphabet characters([A-Za-z]).
- key is also generated by Util::randomAlpha() and it is now 8 character
- long.
- * src/Util.h
- (randomAlpha): New function.
- * src/Util.cc
- (randomAlpha): New function.
- * src/TrackerWatcherCommand.cc
- (execute): In a tracker request: Use torrentMan->key as key parameter.
- Added no_peer_id=1.
-
- Set snubbing flag to false when a choke message is received from a
- snubbed peer.
- * src/ChokeMessage.cc
- (receivedAction): Set snubbing flag to false.
-
- 2006-06-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/TorrentMan.cc (setupInternal1): Fixed peerId generation bug.
- * src/SimpleLogger.h (writeHeader): New function.
- * src/SimpleLogger.cc (writeHeader): New function.
- (writeLog): Fixed the bug that causes segfaults if exception message
- contains an unescaped "%" character.
- * src/TrackerWatcherCommand.cc (execute): Added a short sleep
- when a tracker request fails.
- * src/Request.cc (parseUrl): Query string is now handled properly.
- * Release 0.5.1
-
- 2006-06-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
-
- To add Time class which represents a specific instant in time and
- its precision is microseconds. Time checking procedures were rewritten
- using this object.
- * src/Time.h: New class.
- * src/Time.cc: New class.
- * src/AbstractCommand.h
- (updateCheckPoint): Removed.
- (isTimeoutDetected): Removed.
- (checkPoint): Changed the type to Time.
- (timeout): New variable.
- (setTimeout): New function.
- * src/AbstractCommand.cc
- (AbstractCommand): Removed the initialization of checkPoint.
- Added the initialization of timeout.
- (updateCheckPoint): Removed.
- (isTimeoutDetected): Removed.
- (execute): Use checkPoint.reset() and checkPoint.elapsed().
- * src/PeerChokeCommand.h
- (checkPoint): Changed the type to Time.
- * src/PeerChokeCommand.cc
- (PeerChokeCommand): Removed the initialization of checkPoint.
- (execute): Rewritten using Time object.
- * src/TrackerWatcherCommand.h
- (checkPoint): Changed the type to Time.
- * src/TrackerWatcherCommand.cc
- (TrackerWatcherCommand): Removed the initialization of checkPoint.
- (execute): Rewritten.
- * src/ConsoleDownloadEngine.h
- (cp): Changed the type to Time.
- (startup): Changed the type to Time.
- * src/ConsoleDownloadEngine.cc
- (initStatistics): Use cp.reset(), startup.reset().
- (calculateStatistics): Rewritten using Time object.
- * src/PeerAbstractCommand.h
- (updateCheckPoint): Removed.
- (isTimeoutDetected): Removed.
- (checkPoint): Changed the type to Time.
- * src/PeerAbstractCommand.cc
- (PeerAbstractCommand): Removed the initialization of checkPoint.
- (updateCheckPoint): Removed.
- (isTimeoutDetected): Removed.
- (execute): Use checkPoint.reset() and checkPoint.elapsed().
- * src/PeerInteractionCommand.cc
- (PeerInteractionCommand): Removed the initializations of struct
- timeval variables.
- * src/PeerInteractionCommand.h
- (keepAliveCheckPoint): Changed the type to Time.
- (chokeCheckPoint): Changed the type to Time.
- (freqCheckPoint): Changed the type to Time.
- (haveCheckTime): Changed the type to Time.
- * src/PeerInteractionCommand.cc
- (executeInternal): Rewritten using Time object.
- (detectMessageFlooding): Rewritten using Time object.
- (checkLongTimePeerChoking): Rewritten using Time object.
- (sendKeepAlive): Rewritten using Time object.
- (checkHave): Rewritten using Time object.
- * src/SleepCommand.h
- (checkPoint): Changed the type to Time.
- * src/SleepCommand.cc
- (SleepCommand): Removed the initialization of checkPoint.
- (execute): Rewritten using Time object.
- * src/TorrentAutoSaveCommand.h
- (checkPoint): Changed the type to Time.
- * src/TorrentAutoSaveCommand.cc
- (TorrentAutoSaveCommand): Removed the initialization of checkPoint.
- (execute): Rewritten.
- * src/DownloadCommand.h
- (sw): Changed the type to Time.
- * src/DownloadCommand.cc
- (DownloadCommand): Removed the initialization of sw.
- (executeInternal): Rewritten.
- * src/RequestSlot.h
- (dispatchedTime): Changed the type to Time.
- * src/RequestSlot.cc
- (RequestSlot): Removed the call to setDispatchedTime().
- (setDispatchedTime): Rewirtten.
- (isTimeout): Rewritten.
- (getLatencyInMillis): Rewritten.
- * src/TorrentDownloadEngine.h
- (cp): Changed the type to Time[2].
- (startup): Changed the type to Time.
- * src/TorrentDownloadEngine.cc
- (initStatistics): Rewritten.
- (calculateStatistics): Rewritten.
- * src/DownloadEngine.cc
- (run): Rewritten.
-
- To detect all attempts to connect to the tracker are failed:
- * src/AbstractCommand.cc
- (execute): Increment e->segmentMan->errors if a command aborted.
- * src/SegmentMan.h
- (errors): New variable.
- * src/SegmentMan.cc
- (SegmentMan): Added the initialization of errors.
- (init): Added the initialization of errors.
- * src/TrackerWatcherCommand.cc
- (execute): If e->segmentMan->errors > 0 then assume that the tracker
- request was failed.
-
- To handle snubbed peers:
-
- * src/PeerChokeCommand.cc
- (optUnchokingPeer): Snubbed peers don't get unchoked.
- (execute): Snubbed peers don't get unchoked.
- * src/PeerInteraction.h
- (REQUEST_TIME_OUT): Changed the value from 120 to 60.
- * src/PeerInteraction.cc
- (checkRequestSlot): A peer get marked as "snubbed" if it doesn't send
- back the requested 16k block in 60 seconds.
- * src/PieceMessage.cc
- (receivedAction): A peer's snubbed state is cleard if it sends
- the requested 16k block in 60 seconds.
- * src/Peer.h
- (snubbing): New variable.
- * src/Peer.cc
- (resetStatus): Added snubbed = false.
-
- To fix the bug that causes have message is not sent:
- * src/PeerInteractionCommand.cc
- (~PeerInteractionCommand): Removed e->torrentMan->unadvertisePiece().
- (FLOODING_CHECK_INTERVAL): New definition(temporal).
- (detectMessageFlooding): Use FLOODING_CHECK_INTERVAL.
- * src/TorrentMan.h
- (HaveEntry): New class.
- (advertisePiece): Rewritten.
- (getAdvertisedPieceIndexes): Rewritten.
- (Haves): Changed the type.
- (getAdvertisedPieceIndexes): Added an argument.
-
- Others:
-
- * src/TorrentMan.h
- (DEFAULT_ANNOUNCE_INTERVAL): Changed the value to 1800.
- (DEFAULT_ANNOUNCE_MIN_INTERVAL): Changed the value to 1800.
- * src/TorrentMan.cc
- (getPeer): Don't check the number of connections here.
- (setupInternal1): Changed peerId.
- * src/PeerInteractionCommand.h
- (KEEP_ALIVE_INTERVAL): New definition.
- (sendKeepAlive): Use KEEP_ALIVE_INTERVAL.
- * src/main.cc
- (main): SA_ONESHOT was replaced with SA_RESETHAND.
- * src/DownloadEngine.h: Removed unnecessary header includes.
-
- 2006-05-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To fix the bug that causes segfaults if a tracker returns a zero-length
- list as "peers":
-
- * src/TrackerUpdateCommand.cc
- (execute): Added a check to see wether the type of peers is Data*.
- 2006-05-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * Release 0.5.0
- To fix compile issue with gcc3:
- * src/CancelMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/RejectMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/SuggestPieceMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/AllowedFastMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/PortMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/HaveNoneMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/KeepAliveMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/HaveAllMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/UnchokeMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/BitfieldMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/PieceMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/RequestMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/NotInterestedMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/ChokeMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/InterestedMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
- * src/HaveMessage.h
- (ID): Renamed as ID_t
- (ID_t): New enum.
-
- 2006-05-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/PeerAbstractCommand.h
- (beforeSocketCheck): Removed.
- * src/PeerAbstractCommand.cc
- Modified in order to call executeInternal() even if socket check
- and upload limit check fail.
- * src/PeerInteractionCommand.h
- (keepAlive): Removed.
- (sendKeepAlive): New function.
- (checkHave): New function.
- (beforeSocketCheck): Removed.
- * src/PeerInteractionCommand.cc
- (executeInternal): Use peerInteraction->checkRequestSlot(). Added
- calls to checkHave() and sendKeepAlive().
- (keepAlive): Renamed to sendKeepAlive().
- (sendKeepAlive): New function.
- (beforeSocketCheck): Removed.
- (checkHave): New function.
- * src/BitfieldMan.cc
- (getMissingIndex): Don't call getMissingIndexRandomly() if max is 0.
- (getMissingUnusedIndex): Don't call getMissingIndexRandomly() if max is
- 0.
- (getMissingIndex): Dont't call getMissingIndexRandomly() if max is 0.
- * src/TorrentMan.h
- (UsedPieces): Removed.
- (Pieces): New type definition.
- * src/Piece.h: Updated doc.
- * src/Peer.h
- (totalLength): Removed.
- * src/Peer.cc
- (updateLatency): Fixed the latency calculation.
- * src/TorrentMan.cc
- (addPeer): Call deleteOldErrorPeers() only if peers.size() is higher
- than or equal to MAX_PEER_LIST_SIZE.
- If duplicate is false and peer.size() >= MAX_PEER_LIST_SIZE,
- then return false.
- (deleteOldErrorPeers): Rewritten.
- (deleteUsedPiece): Fixed the miss use of STL remove.
- * src/PeerInteraction.h
- (Pieces): Removed.
- (deleteTimeoutRequestSlot): Removed.
- (deleteCompletedRequestSlot): Removed.
- (checkRequestSlot): New function.
- * src/PeerInteraction.cc
- (deleteTimeoutRequestSlot): Merged to checkRequestSlot().
- (deleteCompletedRequestSlot): Merged to checkRequestSlot().
- (checkRequestSlot): New function.
- * src/DownloadEngine.cc
- (run): Clear activeSockets before calling waitData().
- (waitData): Removed a call to activeSockets.clear().
-
- 2006-05-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To attempt to handle EINTR:
-
- * src/SocketCore.cc
- (isReadable): Added EINTR handling.
- (isWritable): Added EINTR handling.
- To improve the performance:
-
- * src/AbstractCommand.cc
- (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
- * src/PeerInteractionCommand.h
- (receiveMessage): Renamed as receiveMessages().
- (receiveMessages): New function.
- * src/PeerInteractionCommand.cc
- (executeInternal): receiveMessage loop is moved to new receiveMessages
- () function. detectMessageFlooding() is moved here.
- (detectMessageFlooding): Use Util::difftvsec() instead of Util::difftv
- (). The flooding detection for have message is comment out.
- (checkLongTimePeerChoking): Use Util::difftvsec() instead of
- Util::difftv().
- (receiveMessage): Renamed as receiveMessages().
- (receiveMessages): New function.
- (keepAlive): Use Util::difftvsec() instead of Util::difftv().
- (beforeSocketCheck): Commented out checkLongTimePeerChoking().
- * src/SleepCommand.cc
- (execute): Use Util::difftvsec() instead of Util::difftv().
- * src/BitfieldMan.h
- (getNthBitIndex): New function.
- (hasMissingPiece): New function.
- (getAllMissingIndexes): New function.
- * src/BitfieldMan.cc
- (countSetBit): Rewritten.
- (getNthBitIndex): New function.
- (getMissingIndexRandomly): Rewritten.
- (hasMissingPiece): New function.
- (getAllMissingIndexes): New function.
- * src/TorrentMan.cc
- (hasMissingPiece): New function.
- (deleteUsedPiece): Rewritten using STL.
- * src/PeerInteraction.cc
- (getNewPieceAndSendInterest): Use TorrentMan::hasMissingPiece(), which
- is a little bit faster then TorrentMan::getMissingPieceIndex().
- (addRequests): Updated the number of pending requests.
- * src/PeerAbstractCommand.cc
- (isTimeoutDetected): Use Util::difftvsec() instead of Util::difftv().
- (execute): Returns true if TorrentMan::isHalt() is true.
- Corrected the condition of upload limit checking.
- * src/Util.h
- (countBit): New function.
- * src/Util.cc
- (nbits): New variable.
- (countBit): New function.
- * src/DownloadEngine.h
- (SockCmdMap): New type definition.
- (waitData): Added an argument.
- (addSocket): Added an argument.
- (addSocketForReadCheck): Added an argument.
- (addSocketForWriteCheck): Added an argument.
- * src/DownloadEngine.cc
- (run): Executes only commands whose sockets are ready to read or write.
- All commands are executed in every 1 second.
- (waitData): Calls select() again if it returned
- EINTR.
- (addSocket): Saves socket and command object pair to the map.
- (deleteSocket): Deletes socket and command object pair from the map.
- (addSocketForReadCheck): Added an argument.
- (addSocketForWriteCheck): Added an argument.
- * src/DownloadCommand.cc
- (executeInternal): Use Util::difftvsec() instead of Util::difftv().
-
- To send "event=stopped" to the tracker when the application finishes:
-
- * src/PeerChokeCommand.h
- (checkPoint): New variable.
- * src/PeerChokeCommand.cc
- (PeerChokeCommand): Added the initialization of checkPoint.
- (execute): The interval check is now done by checkPoint, not
- SleepCommand. Return true if TorrentMan::isHalt() is true.
- * src/TorrentMan.h
- (halt): New function.
- (hasMissingPiece): New function.
- (isHalt): New function.
- (setHalt): New function.
- * src/TorrentMan.cc
- (TorrentMan): Added the initialization of halt.
- * src/TorrentAutoSaveCommand.h
- (checkPoint): New variable.
- * src/PeerListenCommand.cc
- (execute): Returns true if TorrentMan::isHalt() is true.
- * src/main.cc
- (setSignalHander): Added flags argument.
- (torrentHandler): Just calls TorrentMan::setHalt(true) and returns.
- (main): Set SA_ONESHOT flag of the signal hander of SIGINT and SIGTERM.
- Removed printDownloadAbortMessage() after torrent downloading loop.
- * src/TorrentAutoSaveCommand.cc
- (TorrentAutoSaveCommand): Added the initialization of checkPoint.
- (execute): Returns true if TorrentMan::isHalt() is true.
- The interval check is now done by checkPoint, not SleepCommand.
- * src/TrackerWatcherCommand.cc
- (execute): If TorrentMan::isHalt(), then create a tracker request with
- event=stopped.
- * src/TrackerUpdateCommand.cc
- (prepareForRetry): Do not use SleepCommand here.
- (execute): Returns true if TorrentMan::isHalt() is true.
-
- Others:
-
- * src/TorrentMan.cc
- (getMissingPieceIndex): Updated log message.
- * src/PeerInteraction.cc
- (createPeerMessag): Updated log message.
-
- 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To add the ability to download several pieces in mix in a command and
- increase the number of request slots according to request-cancel
- latency:
-
- * src/PeerInteractionCommand.cc
- (executeInternal): The number of messages to be received at a time
- is increased from 10 to 50.
- * src/LogFactory
- (getInstance): Added NullLogger.
- * src/NullLogger.h: New class.
- * src/BitfieldMan.h
- (getMissingIndex): New function.
- * src/BitfieldMan.cc
- (getMissingIndex): New function.
- * src/TorrentMan.h
- (checkOutPiece): New function.
- (getMissingPieceIndex): New function.
- (getMissingFastPieceIndex): New function.
- (getMissingFastPiece): New function.
- * src/TorrentMan.cc
- (updatePiece): Rewritten using STL.
- (syncPiece): Rewritten using STL.
- (getMissingPiece): Rewritten using getMissingPieceIndex() and
- checkOutPiece().
- (getMissingPieceIndex): New function.
- (getMissingFastPieceIndex): New function.
- (getMissingFastPiece): New function.
- (checkOutPiece): New function.
- * src/PeerInteraction.h
- (Pieces): New type definition.
- (piece): Removed.
- (pieces): New variable.
- (getNewPieceAndSendInterest): Added the "piece" argument.
- (abortPiece): Added the "piece" argument.
- (abortAllPieces): New function.
- (isInRequestSlot): New function.
- (hasDownloadPiece): Added the "index" argument.
- (setDownloadPiece): Removed.
- (getDownloadPiece): Added the "index" argument.
- (updatePiece): New function.
- (createRequestMessage): Added the "index" argument.
- * src/PeerInteraction.cc
- (onChoked): Rewritten.
- (abortPiece): Rewirtten.
- (abortAllPieces): New function.
- (deleteTimeoutRequestSlot): Rewritten.
- Clarified code a little bit.
- (deleteCompletedRequestSlot): Rewritten.
- (isInRequestSlot): New function.
- (syncPiece): Rewritten.
- (updatePiece): New function.
- (getNewPieceAndSendInterest): Rewritten.
- (addRequests): Rewritten.
- (getDownloadPiece): Rewritten.
- (hasDownloadPiece): Rewritten.
- (createRequestMessage): Added the "index" argument.
- * src/common.h
- (BITFIELD_LEN_FROM_PIECES): Enclosed the variable in parentheses.
- (DIV_FLOOR): New definition.
- * src/PieceMessage.cc
- (receivedAction): Update request-piece latency here.
- * src/RequestSlot.h
- (getLatencyInMillis): New function.
- * src/RequestSlot.cc
- (isTimeout): Rewritten using getLatencyInMillis.
- (getLatencyInMillis): New function.
- * src/Piece.h
- (operator==): New function.
- (getMissingBlockIndex): New function.
- * src/Piece.cc
- (operator==): New function.
- (getMissingBlockIndex): New function.
- * src/Peer.h
- (DEFAULT_LATENCY): New definition.
- (latency): New variable.
- (updateLatency): New function.
- (getLatency): New function.
- * src/Peer.cc
- (resetStatus): Reset latecy.
- (updateLatency): New function.
-
- 2006-05-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/SocketCore.cc
- (isReadable): Added secure to the condition.
- * src/HttpConnection.cc
- (receiveResponse): Fixed a bug that causes no response header
- exception.
- * src/Peer.h
- (getFastSet): Fixed the return value type.
-
- 2006-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To remove a wait from download loop:
- * src/DownloadEngine.cc
- (run): Comment out shortSleep.
-
- To rewrite the message handling:
- * src/SimplePeerMessage.h: New class.
- * src/SimplePeerMessage.cc: New class.
- * src/CancelMessage.h: Derived from SimplePeerMessage.
- (msg): New variable.
- (create): New function.
- (send): Removed.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/CancelMessage.cc
- (create): New function.
- (receivedAction): Replaced deleteRequestMessageInQueue with
- rejectPieceMessageInQueue.
- (send): Removed.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/BitfieldMessage.h: Derived from SimplePeerMessage.
- (msg): New variable.
- (msgLength): New variable.
- (~BitfieldMessage): Deleted msg.
- (send): Removed.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/BitfieldMessage.cc
- (create): New function.
- (send): Removed.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/ChokeMessage.h: Derived from SimplePeerMessage.
- (msg): New variable.
- (sendPredicate): New function.
- (onSendComplete): New function.
- (send): Removed.
- (getMessage): New function.
- (getMessageLength): New function.
- (create): New function.
- * src/ChokeMessage.cc
- (create): New function.
- (send): Removed.
- (sendPredicate): New function.
- (getMessage): New function.
- (getMessageLength): New function.
- (onSendComplete): New function.
- * src/KeepAliveMessage.h: Derived from SimplePeerMessage.
- (msg): New variable.
- (send): Removed.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/KeepAliveMessage.cc
- (send): Removed.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/PortMessage.h
- (create): New function.
- (receivedAction): Updated log message.
- * src/PortMessage.cc: New file.
- * src/UnchokeMessage.h: Derived from SimplePeerMessage.
- (msg): New variable.
- (sendPredicate): New function.
- (onSendComplete): New function.
- (create): New function.
- (send): Removed.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/UnchokeMessage.cc
- (create): New function.
- (send): Removed.
- (sendPredicate): New function.
- (getMessage): New function.
- (getMessageLength): New function.
- (onSendComplete): New function.
- * src/PieceMessage.h
- (leftPieceDataLength): Removed.
- (leftDataLength): New variable.
- (headerSend): New variable.
- (pendingCount): New variable.
- (msgHeader): New variable.
- (sendPieceData): New function.
- (incrementPendingCount): New function.
- (isPendingCountMax): New function.
- (create): New function.
- (getMessageHeader): New function.
- (getMessageHeaderLength): New function.
- * src/PieceMessage.cc
- (create): New function.
- (getMessageHeader): New function.
- (getMessageHeaderLength): New function.
- (send): Rewritten.
- (sendPieceData): New function.
- * src/HaveMessage.h: Derived from SimplePeerMessage.
- (msg): New variable.
- (create): New function.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/HaveMessage.cc
- (create): New function.
- (send): Removed.
- (sendPieceData): New function.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/RequestMessage.h: Derived from SimplePeerMessage.
- (msg): New variable.
- (create): New function.
- (send): Removed.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/RequestMessage.cc
- (create): New function.
- (receivedAction): Added the handling of fast extension.
- Deleted torrentMan->addUploadLength, torrentMan->addDeltaUploadLength.
- (send): Removed.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/InterestedMessage.h: Derived from SimplePeerMessage.
- (msg): New variable.
- (sendPredicate): New function.
- (onSendComplete): New function.
- (create): New function.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/InterestedMessage.cc
- (create): New function.
- (send): Removed.
- (sendPieceData): New function.
- (getMessage): New function.
- (getMessageLength): New function.
- (onSendComplete): New function.
- * src/NotInterestedMessage.h: Derived from SimplePeerMessage.
- (msg): New variable.
- (sendPieceData): New function.
- (onSendComplete): New function.
- (create): New function.
- (send): Removed.
- (getMessage): New function.
- (getMessageLength): New function.
- * src/NotInterestedMessage.cc
- (create): New function.
- (send): Removed.
- (sendPredicate): New function.
- (getMessage): New function.
- (getMessageLength): New function.
- (onSendComplete): New function.
- * src/AllowedFastMessage.h: New class.
- * src/AllowedFastMessage.cc: New class.
- * src/RejectMessage.h: New class.
- * src/RejectMessage.cc: New class.
- * src/SuggestPieceMessage.h: New class.
- * src/SuggestPieceMessage.cc: New class.
- * src/HaveAllMessage.h: New class.
- * src/HaveAllMessage.cc: New class.
- * src/HaveNoneMessage.h: New class.
- * src/HaveNoneMessage.cc: New class.
- * src/HandshakeMessage.h: Derived from SimplePeerMessage.
- (msg): New variable.
- (reserved): New variable.
- (create): New function.
- (getId): New function.
- (receivedAction): New function.
- (getMessage): New function.
- (getMessageLength): New function.
- (isFastExtensionSupported): New function.
- * src/HandshakeMessage.cc
- (HandshakeMessage): Moved here from HandshakeMessage.h.
- (create): New function.
- (getMessage): New function.
- (getMessageLength): New function.
- (toString): Added the output of reserved field.
- (check): Added const qualifier.
- (isFastExtensionSupported): New function.
- * src/PeerMessageUtil.h
- (createChokeMessage): Removed.
- (createUnchokeMessage): Removed.
- (createInterestedMessage): Removed.
- (createNotInterestedMessage): Removed.
- (createHaveMessage): Removed.
- (createBitfieldMessage): Removed.
- (createRequestMessage): Removed.
- (createCancelMessage): Removed.
- (createPieceMessage): Removed.
- (createPortMessage): Removed.
- (createChokeMessage): Removed.
- (createUnchokeMessage): Removed.
- (createInterestedMessage): Removed.
- (createNotInterestedMessage): Removed.
- (createHaveMessage): Removed.
- (createBitfieldMessage): Removed.
- (createRequestMessage): Removed.
- (createCancelMessage): Removed.
- (createPieceMessage): Removed.
- (createKeepAliveMessage): Removed.
- (createHandshakeMessage): Removed.
- (setIntParam): New function.
- (createPeerMessageString): New function.
- * src/PeerMessageUtil.cc
- (createChokeMessage): Removed.
- (createUnchokeMessage): Removed.
- (createInterestedMessage): Removed.
- (createNotInterestedMessage): Removed.
- (createHaveMessage): Removed.
- (createBitfieldMessage): Removed.
- (createRequestMessage): Removed.
- (createCancelMessage): Removed.
- (createPieceMessage): Removed.
- (createPortMessage): Removed.
- (createRequestMessage): Removed.
- (createCancelMessage): Removed.
- (createPieceMessage): Removed.
- (createHaveMessage): Removed.
- (createChokeMessage): Removed.
- (createUnchokeMessage): Removed.
- (createInterestedMessage): Removed.
- (createNotInterestedMessage): Removed.
- (createBitfieldMessage): Removed.
- (createKeepAliveMessage): Removed.
- (createHandshakeMessage): Removed.
- (setIntParam): New function.
- (createPeerMessageString): New function.
- * src/PeerConnection.h
- (peer): Removed.
- (torrentMan): Removed.
- (createNLengthMessage): Removed.
- (setIntParam): Removed.
- (writeOutgoingMessageLog): Removed all overloaded functions.
- (PeerConnection): Deleted peer and torrentMan from its arguments.
- (sendMessage): New function.
- (sendHandshake): Removed.
- (sendKeepAlive): Removed.
- (sendChoke): Removed.
- (sendUnchoke): Removed.
- (sendInterested): Removed.
- (sendNotInterested): Removed.
- (sendHave): Removed.
- (sendBitfield): Removed.
- (sendRequest): Removed.
- (sendPiece): Removed.
- (sendPieceHeader): Removed.
- (sendPieceData): Removed.
- (sendCancel): Removed.
- (getPeer): Removed.
- * src/PeerConnection.cc
- (PeerConnection): Deleted peer and torrentMan from its arguments.
- (sendHandshake): Removed.
- (sendKeepAlive): Removed.
- (createNLengthMessage): Removed.
- (setIntParam): Removed.
- (writeOutgoingMessageLog): Removed all overloaded functions.
- (sendChoke): Removed.
- (sendUnchoke): Removed.
- (sendInterested): Removed.
- (sendNotInterested): Removed.
- (sendHave): Removed.
- (sendBitfield): Removed.
- (sendRequest): Removed.
- (sendPiece): Removed.
- (sendPieceHeader): Removed.
- (sendPieceData): Removed.
- (sendMessage): New function.
- (sendCancel): Removed.
- * src/PeerInteractionCommand.cc
- (PeerInteractionCommand): Call setUploadLimit.
- (executeInternal): Call setUploadLimit.
- Added the handling of "inProgress" state of handshake message.
- Call sendBitfield() or sendAllowdFast() instead of deprecated
- sendNow().
- (keepAlive): Call addMessage and sendMessage instead of deprecated
- sendNow().
- (beforeSocketCheck): Call addMessage instead of deprecated trySendNow()
- * src/TorrentMan.h
- (PEER_ID_LENGTH): New definition.
- (hasAllPieces): New function.
- * src/TorrentMan.cc
- (getMissingPiece): Added the handling of fast extension.
- (cancelPiece): Call updatePiece().
- (hasAllPieces): New function.
- * src/PeerInteraction.h
- (fastSet): New variable.
- (getNewPieceAndSendInterest): Changed the return type to void.
- (send): Renamed as sendMessages.
- (deleteAllRequestSlot): Removed.
- (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
- (cancelAllRequest): Removed all overloaded functions.
- (deleteAllRequestSlot): Removed.
- (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
- (rejectPieceMessageInQueue): New function.
- (rejectAllPieceMessageInQueue): New function.
- (onChoked): New function.
- (isSendingMessageInProgress): New function.
- (getCorrespondingRequestSlot): Changed its arguments.
- (isInFastSet): New function.
- (addFastSetIndex): New function.
- (addRequests): New function.
- (sendNow): Removed.
- (trySendNow): Removed.
- (sendBitfield): New function.
- (sendAllowdFast): New function.
- (createHaveAllMessage): New function.
- (createHaveNoneMessage): New function.
- (createRejectMessage): New function.
- (createAllowedFastMessage): New function.
- * src/PeerInteraction.cc
- (send): Renamed as sendMessages.
- (sendMessages): New function.
- (MsgPushBack): New class.
- (isSendingMessageInProgress): New function.
- (deletePieceMessageInQueue): Renamed as rejectAllPieceMessageInQueue.
- (rejectAllPieceMessageInQueue): New function.
- Added the handling of fast extension.
- (deleteRequestMessageInQueue): Renamed as rejectPieceMessageInQueue.
- (rejectPieceMessageInQueue): New function.
- Added the handling of fast extension.
- (deleteRequestSlot): Replaced for loop with std::find.
- (onChoked): New function.
- (deleteAllRequestSlot): Removed.
- (abortPiece): Rewirtten.
- (deleteTimeoutRequestSlot): Updated log messages.
- (getCorrespondingRequestSlot): Changed its arguments.
- (cancelAllRequest): Removed all overloaded functions.
- (receiveHandshake): Added the check to see whether an incoming peer
- supports fast extension.
- (createHandshakeMessage): Use HandshakeMessage::create instead of
- PeerMessageUtil.
- (createPeerMessage): Use create() of each message class instead of
- PeerMessageUtil.
- HaveAllMessage, HaveNoneMessage, RejectMessage, SuggestPieceMessage,
- AllowedFastMessage were added.
- (getNewPieceAndSendInterest): Changed its return value type to void.
- Added the handling of fast extension.
- (addRequests): New function.
- (sendNow): Removed.
- (sendHandshake): Rewritten.
- (trySendNow): Removed.
- (sendBitfield): New function.
- (sendAllowdFast): New function.
- (isInFastSet): New function.
- (addFastSetIndex): New function.
- (createRequestMessage): Use RequestMessage::create instead of
- PeerMessageUtil.
- (createCancelMessage): Use CancelMessage::create instead of
- PeerMessageUtil.
- (createPieceMessage): Use PieceMessage::create instead of
- PeerMessageUtil.
- (createHaveMessage): Use HaveMessage::create instead of
- PeerMessageUtil.
- (createChokeMessage): Use ChokeMessage::create instead of
- PeerMessageUtil.
- (createUnchokeMessage): Use UnchokeMessage::create instead of
- PeerMessageUtil.
- (createInterestedMessage): Use InterestedMessage::create instead of
- PeerMessageUtil.
- (createNotInterestedMessage): Use NotInterestedMessage::create instead
- of PeerMessageUtil.
- (createBitfieldMessage): Use BitfieldMessage::create instead of
- PeerMessageUtil.
- (createKeepAliveMessage): Use KeepAliveMessage::create instead of
- PeerMessageUtil.
- (createHaveAllMessage): New function.
- (createHaveNoneMessage): New function.
- (createRejectMessage): New function.
- (createAllowedFastMessage: New function.
- * src/Util.h
- (sha1Sum): New function.
- (computeFastSet): New function.
- * src/Util.cc
- (sha1Sum): New function.
- (computeFastSet): New function.
- * src/Peer.h
- (fastExtensionEnabled): New variable.
- (fastSet): New variable.
- (setAllBitfield): New function.
- (setFastExtensionEnabled): New function.
- (isFastExtensionEnabled): New function.
- (addFastSetIndex): New function.
- (getFastSet): New function.
- (isInFastSet): New function.
- (countFastSet): New function.
- * src/Peer.cc
- (isInFastSet): New function.
- (addFastSetIndex): New function.
- (setAllBitfield): New function.
-
- * src/AbstractCommand.cc (execute): Changed the procedure of checking
- sockets.
- * src/PeerAbstractCommand.cc
- (PeerAbstractCommand): Added the initialization for uploadLimitCheck
- and uploadLimit.
- (execute): Changed the procedure of checking sockets. The upload speed
- checking were added.
- (setUploadLimit): New function.
- (setUploadLimitCheck): New function.
- * src/PeerAbstractCommand.h
- (setUploadLimit): New function.
- (setUploadLimitCheck): New function.
- (uploadLimit): New variable.
- (uploadLimitCheck): New variable.
- To contact a tracker regularly:
-
- * src/TrackerWatcherCommand.h (interval): New variable.
- (checkPoint): New variable.
- (TrackerWatcherCommand): Added interval argument.
- * src/TrackerWatcherCommand.cc
- (TrackerWatcherCommand): Initialized checkPoint.
- (execute): Now a tracker is contacted in every specified period.
- If peer list is not needed, send request with numwant=0.
- * src/TrackerUpdateCommand.cc
- (execute): Updated log messages.
- * src/DownloadEngine.cc
- (~DownloadEngine): Removed two asserts.
- (waitData): Uncommented wfds. May be a bug fix.
-
- 2006-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/PeerInteractionCommand.h
- (checkInactiveConnection): Removed.
- * src/PeerInteractionCommand.cc
- (executeInternal): Removed following function calls:
- detectMessageFlooding(), checkLongTimePeerChoking and
- checkInactiveConnection().
- (checkInactiveConnection): Removed.
- (detectMessageFlooding): Removed function call to
- checkInactiveConnection().
- * src/PeerMessageUtil.h
- (createChokeMessage): New function. Overload.
- (createUnchokeMessage): New function. Overload.
- (createInterestedMessage): New function. Overload.
- (createNotInterestedMessage): New function. Overload.
- (createHaveMessage): New function. Overload.
- (createBitfieldMessage): New function. Overload.
- (createRequestMessage): New function. Overload.
- (createCancelMessage): New function. Overload.
- (createPieceMessage): New function. Overload.
- (createKeepAliveMessage): New function. Overload.
- * src/PeerMessageUtil.cc
- (createChokeMessage): New function. Overload.
- (createUnchokeMessage): New function. Overload.
- (createInterestedMessage): New function. Overload.
- (createNotInterestedMessage): New function. Overload.
- (createHaveMessage): New function. Overload.
- (createBitfieldMessage): New function. Overload.
- (createRequestMessage): New function. Overload.
- (createCancelMessage): New function. Overload.
- (createPieceMessage): New function. Overload.
- (createKeepAliveMessage): New function. Overload.
- * src/SendMessageQueue.cc
- (createRequestMessage): Use PeerMessageUtil.
- (createCancelMessage): Use PeerMessageUtil.
- (createPieceMessage): Use PeerMessageUtil.
- (createHaveMessage): Use PeerMessageUtil.
- (createChokeMessage): Use PeerMessageUtil.
- (createUnchokeMessage): Use PeerMessageUtil.
- (createInterestedMessage): Use PeerMessageUtil.
- (createNotInterestedMessage): Use PeerMessageUtil.
- (createBitfieldMessage): Use PeerMessageUtil.
- (createKeepAliveMessage): Use PeerMessageUtil.
- * src/SendMessageQueue.h: Renamed to PeerInteraction.h
- * src/SendMessageQueue.cc: Renamed to PeerInteraction.cc
- * src/PeerInteraction.h: New class.
- * src/PeerInteraction.cc: New class.
-
- 2006-05-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- Each peer message has its own class.
-
- * src/PendingMessages.h: Removed.
- * src/PendingMessages.cc: Removed. The sending process was moved to
- each message class.
- * src/RequestSlotMan.h: Removed.
- * src/RequestSlotMan.cc: Removed. All functionarities were moved to
- SendMessageQueue.
- * src/RequestMessage.h: New class.
- * src/RequestMessage.cc: New class.
- * src/CancelMessage.h: New class.
- * src/CancelMessage.cc: New class.
- * src/BitfieldMessage.h: New class.
- * src/BitfieldMessage.cc: New class.
- * src/ChokeMessage.h: New class.
- * src/ChokeMessage.cc: New class.
- * src/KeepAliveMessage.h: New class.
- * src/KeepAliveMessage.cc: New class.
- * src/PortMessage.h: New class.
- * src/UnchokeMessage.h: New class.
- * src/UnchokeMessage.cc: New class.
- * src/PieceMessage.h: New class.
- * src/PieceMessage.cc: New class.
- * src/HaveMessage.h: New class.
- * src/HaveMessage.cc: New class.
- * src/BitfieldMessage.h: New class.
- * src/BitfieldMessage.cc: New class.
- * src/NotInterestedMessage.h: New class.
- * src/NotInterestedMessage.cc: New class.
- * src/InterestedMessage.h: New class.
- * src/InterestedMessage.cc: New class.
- * src/HandshakeMessage.h (sendMessageQueue): New variable.
- (getSendMessageQueue): New function.
- (setSendMessageQueue): New function.
- * src/HandshakeMessage.cc: New class.
- * src/PeerConnection.h (receiveMessage): Changed return value and
- arguments.
- (receiveHandshake): Changed return value and arguments.
- * src/PeerConnection.cc (receiveMessage): Do not create message class
- here.
- (receiveHandshake): Do not create handshake class here.
- * src/PeerInteractionCommand.h (peerConnection): Removed.
- (piece): Removed.
- (syncPiece): Removed.
- (sendInterest): Removed.
- (sendMessages): Removed.
- (createRequestPendingMessage): Removed.
- (checkPieceHash): Removed.
- (erasePieceOnDisk): Removed.
- (getNewPieceAndSendInterest): Removed.
- (onGotNewPice): Removed.
- (onGotWrongPiece): Removed.
- * src/PeerInteractionCommand.cc (PeerInteractionCommand):
- Removed peerConnection, piece.
- (~PeerInteractionCommand): Removed peerConnection.
- (executeInternal): Use sendMessageQueue instead of peerConnection.
- (syncPiece): Moved to SendMessageQueue.
- (decideChoking): Removed PendingMessage.
- (receiveMessage): Use sendMessageQueue instead of peerConnection.
- The action after receiving peer message was moved to each message
- class.
- (onGotNewPice): Moved to SendMessageQueue.
- (onGotWrongPiece): Moved to SendMessageQueue.
- (getNewPieceAndSendInterest): Moved to SendMessageQueue.
- (sendInterest): Moved to SendMessageQueue.
- (createRequestPendingMessage): Removed.
- (sendMessages): Moved to SendMessageQueue.
- (onAbort): Use SendMessageQueue::abortPiece()
- (keepAlive): Use sendMessageQueue instead of peerConnection.
- (beforeSocketCheck): Use sendMessageQueue instead of peerConnection.
- (checkPieceHash): Moved to SendMessageQueue.
- (erasePieceOnDisk): Moved to SendMessageQueue.
- * src/PeerMessageUtil.h
- (createBitfieldMessage): Removed.
- (createHaveMessage): Changed return value and arguments.
- (createBitfieldMessage): Changed return value and arguments.
- (createRequestCancelMessage): Removed.
- (createPieceMessage): Changed return value and arguments.
- (getShortIntParam): New function.
- (checkIndex): Changed arguments.
- (checkBegin): Changed arguments.
- (checkLength): Changed arguments.
- (checkPieceOffset): Removed.
- (checkRange): New function.
- (checkBitfield): Changed arguments.
- (createPeerMessage): Removed.
- (checkIntegrity): Removed.
- (createHandshakeMessage): Changed arguments.
- (createChokeMessage): New function.
- (createUnchokeMessage): New function.
- (createInterestedMessage): New function.
- (createNotInterestedMessage): New function.
- (createRequestMessage): New function.
- (createCancelMessage): New function.
- (createPortMessage): New function.
- * src/PeerMessageUtil.cc
- (createBitfieldMessage): Removed.
- (createHaveMessage): Changed return value and arguments.
- (createBitfieldMessage): Changed return value and arguments.
- (createRequestCancelMessage): Removed.
- (createPieceMessage): Changed return value and arguments.
- (getShortIntParam): New function.
- (checkIndex): Changed arguments.
- (checkBegin): Changed arguments.
- (checkLength): Changed arguments.
- (checkPieceOffset): Removed.
- (checkRange): New function.
- (checkBitfield): Changed arguments.
- (createPeerMessage): Removed.
- (checkIntegrity): Removed.
- (createHandshakeMessage): Changed arguments.
- (createChokeMessage): New function.
- (createUnchokeMessage): New function.
- (createInterestedMessage): New function.
- (createNotInterestedMessage): New function.
- (createRequestMessage): New function.
- (createCancelMessage): New function.
- (createPortMessage): New function.
- * src/PeerMessage.h
- (id): Removed.
- (index): Removed.
- (begin): Removed.
- (length): Removed.
- (bitfield): Removed.
- (bitfieldLength): Removed.
- (block): Removed.
- (blockLength): Removed.
- (inProgress): New variable.
- (cuid): New variable.
- (peer): New variable.
- (sendMessageQueue): New variable.
- (logger): New variable.
- (setBitfield): Removed.
- (getBitfield): Removed.
- (setBlock): Removed.
- (getBlock): Removed.
- (getBitfieldLength): Removed.
- (getBlockLength): Removed.
- (isInProgress): New function.
- (toString): Made pure virtual.
- (check): New function.
- (send): New function.
- (receivedAction): New function.
- (getId): Made pure virtual.
- (setId): Removed.
- (getIndex): Removed.
- (setIndex): Removed.
- (getBegin): Removed.
- (setBegin): Removed.
- (getLength): Removed.
- (setLength): Removed.
- (getCuid): New function.
- (setCuid): New function.
- (getPeer): New function.
- (setPeer): New function.
- (getSendMessageQueue): New function.
- (setSendMessageQueue): New function.
- (ID): Removed.
- * src/PeerMessage.cc
- (setBitfield): Removed.
- (setBlock): Removed.
- (toString): Removed.
- * src/TorrentMan.h
- (getPieceLength): New function.
- (getPieceLength): New function.
- * src/SendMessageQueue.h
- (REQUEST_TIME_OUT): New definition.
- (RequestSlots): New definition.
- (MessageQueue): New definition.
- (requestSlotMan): Removed.
- (pendingMessages): Removed.
- (requestSlots): New variable.
- (messageQueue): New variable.
- (torrentMan): New variable.
- (peerConnection): New variable.
- (peer): New variable.
- (piece): New variable.
- (getNewPieceAndSendInterest): New function.
- (createPeerMessage): New function.
- (createHandshakeMessage): New function.
- (send): Made private.
- (setPeerMessageCommonProperty): New function.
- (deleteAllRequestSlot): New function.
- (deleteRequestMessageInQueue): New function.
- (cancelAllRequest): Made private.
- (cancelAllRequest): Made private.
- (countRequestSlot): Made private.
- (addPendingMessage): Removed.
- (deletePendingPieceMessage): Removed.
- (deletePendingRequestMessage): Removed.
- (addMessage): New function.
- (deletePieceMessageInQueue): New function.
- (deleteTimeoutRequestSlot): Changed argument.
- (deleteCompletedRequestSlot): Changed argument.
- (getCorrespoindingRequestSlot): Renamed to getCorrespondingRequestSlot.
- (getCorrespondingRequestSlot): New function.
- (countPendingMessage): Removed.
- (countMessageInQueue): New function.
- (getTorrentMan): New function.
- (getPeerConnection): New function.
- (hasDownloadPiece): New function.
- (getDownloadPiece): New function.
- (setDownloadPiece): New function.
- (syncPiece): New function.
- (sendMessages): New function.
- (sendNow): New function.
- (trySendNow): New function.
- (abortPiece): New function.
- (sendHandshake): New function.
- (receiveMessage): New function.
- (receiveHandshake): New function.
- (createRequestMessage): New function.
- (createCancelMessage): New function.
- (createPieceMessage): New function.
- (createHaveMessage): New function.
- (createChokeMessage): New function.
- (createUnchokeMessage): New function.
- (createInterestedMessage): New function.
- (createNotInterestedMessage): New function.
- (createBitfieldMessage): New function.
- (createKeepAliveMessage): New function.
- * src/SendMessageQueue.cc
- (SendMessageQueue): Removed requestSlotMan.
- Instantiated peerConnection here.
- (~SendMessageQueue): Removed requestSlotMan.
- Added deletion of peerConnection and the contents of messageQueue.
- (send): Updated according to the change of messageQueue.
- (addPendingMessage): Renamed to addMessage.
- (addMessage): New function.
- (deletePendingPieceMessage): Renamed to deletePieceMessageInQueue.
- (deletePieceMessageInQueue): New function.
- (deletePendingRequestMessage): Renamed to deleteRequestMessageInQueue.
- (deleteRequestMessageInQueue): New function.
- (deleteRequestSlot): RequestSlotMan::deleteRequestSlot(...) was moved
- here.
- (deleteTimeoutRequestSlot): RequestSlotMan::deleteTimeoutRequestSlot
- (...) was moved here.
- (deleteAllRequestSlot): RequestSlotMan::deleteAllRequestSlot(...) was
- moved here.
- (deleteCompletedRequestSlot):
- RequestSlotMan::deleteCompletedRequestSlot(...) was moved here.
- (getCorrespondingRequestSlot):
- RequestSlotMan::getCorrespoindingRequestSlot(...) was moved here.
- And renamed to getCorrespondingRequestSlot, correcting a typo.
- (countPendingMessage): Renamed to countMessageInQueue.
- (countMessageInQueue): New function.
- (countRequestSlot): RequestSlotMan::countRequestSlot() was moved here.
- (receiveHandshake): New function.
- (createHandshakeMessage): New function.
- (receiveMessage): New function.
- (createPeerMessage): New function.
- (syncPiece): New function.
- (getNewPieceAndSendInterest): New function.
- (sendMessages): New function.
- (sendNow): New function.
- (trySendNow): New function.
- (sendHandshake): New function.
- (abortPiece): New function.
- (getDownloadPiece): New function.
- (getPeerMessageCommonProperty): New function.
- (createRequestMessage): New function.
- (createCancelMessage): New function.
- (createPieceMessage): New function.
- (createHaveMessage): New function.
- (createChokeMessage): New function.
- (createUnchokeMessage): New function.
- (createInterestedMessage): New function.
- (createNotInterestedMessage): New function.
- (createBitfieldMessage): New function.
- (createKeepAliveMessage): New function.
-
-
- To add simple Content-Disposition support:
- * src/HttpResponseCommand.h (determinFilename): New function.
- * src/HttpResponseCommand.cc (executeInternal):
- Use determinFilename(headers) instead of req->getFile() when comparing
- filename.
- (determinFilename): New function.
- (handleDefaultEncoding): Use determinFilename(headers) instead of
- req->getFile().
- (handleOtherEncoding): Use determinFilename(headers) instead of
- req->getFile().
- * src/Util.h (getContentDispositionFilename): New function.
- * src/Util.cc (getContentDispositionFilename): New function.
-
- * src/LogFactory.h (release): New function.
- * src/LogFactory.cc (release): New function.
- To fix a bug that causes out-of-bound exception when HTTP status
- line is wrong:
-
- * src/HttpConnection.cc (receiveResponse): Added a check for header
- size.
- * src/common.h (Deleter): New class.
- * src/SegmentMan.cc
- (~SegmentMan): Added deletion of splitter and diskWriter.
- * src/DownloadEngine.h
- (Commands): Use deque.
- (clearQueue): New function.
- * src/DownloadEngine.cc
- (~DownloadEngine): Added deletion of segmentMan.
- (cleanQueue): New function.
- * src/TorrentDownloadEngine.h
- (TorrentDownloadEngine): The implementation was moved to
- TorrentDownloadEngine.cc.
- (~TorrentDownloadEngine): The implementation was moved to
- TorrentDownloadEngine.cc.
- * src/TorrentDownloadEngine.cc
- (~TorrentDownloadEngine): Added deletion of torrentMan.
- * src/main.cc
- (clearRequest): Removed.
- (handler): Added deletion of e.
- (torrentHandler): Added deletion of te.
- (main): Do not share splitter.
- Use Deleter instead of clearRequest.
- Deletion of classes were updated.
-
- 2006-05-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/main.cc (main): Fixed typo.
- * src/message.h: Fixed typo.
- * po/de.po: Added German translation, thanks to Hermann J. Beckers.
-
- 2006-04-29 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To add --select-file command-line option:
-
- * src/Util.cc
- (unfoldRange): New function.
- (getNum): New function.
- (unfoldSubRange): New function
- * src/main.cc
- (showUsage): Added help message.
- (main): Added --select-file command-line option. Updated the layout of
- file listing.
- * src/common.h
- (Integers): New definition.
- * src/SocketCore.cc
- (writeData): Removed timeout argument.
- (readData): Removed timeout argument.
- (peekData): Removed timeout argument.
- * src/Socket.cc
- (writeData): Removed timeout argument.
- (readData): Removed timeout argument.
- (peekData): Removed timeout argument.
-
- * Release 0.4.1
-
- 2006-04-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To deploy upload rate based choking algorithm:
-
- * src/PeerInteractionCommand.cc
- (PeerInteractionCommand): Add peer to TorrentMan::activePeers to track
- peer currently used.
- (decideChoking): Deleted the choke/unchoke decision algorithm when
- download completes. Simplified.
- (receiveMessage): Updated.
- * src/TorrentMan.h
- (activePeers): New variable.
- (addActivePeer): New function.
- (getActivePeers): New function.
- (deleteActivePeer): New function.
- * src/TorrentMan.cc
- (addPeer): deleteOldErrorPeers is moved to the begining of the function
- * src/PeerAbstractCommand.cc
- (onAbort): Use peer->resetStatus().
- * src/main.cc
- (PeerChokeCommand.h): Included.
- (main): Added the instance of ChokingCommand to the command queue.
- * src/Peer.h
- (amChoking): Renamed from amChocking
- (chokingRequired): New variable.
- (optUnchoking): New variable.
- (deltaUpload): New variable.
- (deltaDownload): New variable.
- (addDeltaUpload): New function.
- (resetDeltaUpload): New function.
- (addDeltaDownload): New function.
- (resetDeltaDownload): New function.
- (addPeerUpload): Added a call to addDeltaUpload.
- (addPeerDownload): Added a call to addDeltaDownload.
- * src/Peer.cc
- (shouldBeChoking): Renamed from shouldChoke.
- (resetStatus): New function.
- * src/PeerChokeCommand.h: New class.
- * src/PeerChokeCommand.cc: New class.
-
- To add lazy upload speed limiter:
- * src/TorrentConsoleDownloadEngine.h: Moved the variables for
- statistics calculation to TorrentDownloadEngine.
- * src/TorrentConsoleDownloadEngine.cc
- (sendStatistics): Renamed from printStatistics.
- (initStatistics): Removed. Moved to TorrentDownloadEngine.
- (calculateSpeed): Removed. Moved to TorrentDownloadEngine.
- (calculateStatistics): Removed. Moved to TorrentDownloadEngine.
- * src/TorrentDownloadEngine.h: Added the variables for statistics
- calculation.
- (sendStatistics): New function as pure virtual function.
- (getUploadSpeed): New function.
- * src/TorrentDownloadEngine.cc
- (initStatistics): New function.
- (calculateSpeed): New function.
- (calculateStatistics): New function.
- * src/SendMessageQueue.h
- (uploadLength): New variable.
- (send): Added an argument.
- (setUploadLimit): New function.
- (getUploadLimit): New function.
- * src/SendMessageQueue.cc
- (send): Added upload speed limiter.
- * src/prefs.h
- (PREF_UPLOAD_LIMIT): New definition.
- * src/PeerInteractionCommand.cc
- (PeerInteractionCommand): Set upload speed limit to sendMessageQueue.
- * src/main.cc
- (main): Added --upload-limit option
- For bug fixes:
-
- * src/main.cc
- (showUsage): Corrected --listen-port help
- Other changes:
-
- * src/TorrentMan.cc
- (getPeer): Return nullPeer if connection is grather than
- MAX_PEER_UPDATE(15) in order to leave space for incoming peers.
- 2006-04-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To add some useful information to the exception message:
- * src/SocketCore.cc : Updated messages.
- * src/SegmentMan.cc :
- * src/TorrentMan.cc : Updated messages.
- * src/MultiDiskWriter.cc : Updated messages.
- * src/Util.cc : Updated messages.
- * src/AbstractDiskWriter.cc : Updated messages.
- * src/PreAllocationDiskWriter.cc : Updated messages.
- * src/message.cc : Added new messages. Updated some messages.
- * src/TrackerWatcherCommand.h (MIN_PEERS): New definition.
- * src/TrackerWatcherCommand.cc (execute): Use MIN_PEERS.
- Updated threshold from 30 to 15.
- * src/AbstractDiskWriter.h (filename): New variable.
- * src/AbstractDiskWriter.cc (openExistingFile): Assigned filename.
- (createFile): Assigned filename.
-
- * src/main.cc: Updated the help message for http-auth-scheme.
- * Release 0.4.0
-
- 2006-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To add TrackerUpdateCommand with which replaces
- CompactTrackerResponseProcessor:
-
- * src/TrackerWatcherCommand.h (req): Removed.
- * src/TrackerWatcherCommand.cc (execute): Send a request to tracker
- if the number of peer connections are less than 30.
- * src/ByteArrayDiskWriter.h (readData): Implemented.
- * src/SegmentMan.h (diskWriter): New function.
- * src/SegmentMan.cc (init): Added a call to diskWriter->closeFile()
- * src/main.cc : Removed #include "CompactTrackerResponseProcessor.h"
- (main): Use TrackerUpdateCommand.
- * src/TorrentMan.h (CompactTrackerResponseProcessor): Removed.
- (req): New variable.
- (setTrackerResponseProcessor): Removed.
- (getTrackerResponseProcessor): Removed.
- (processTrackerResponse): Removed.
- * src/DownloadEngine.h (diskWriter): Removed.
- * src/TorrentDownloadEngine.cc (afterEachIteration): Removed a call
- to torrentMan->processTrackerResponse().
-
- To add Util::expandBuffer:
-
- * src/ByteArrayDiskWriter.h (expandBuffer): Removed.
- * src/ByteArrayDiskWriter.cc (writeData): Use Util::expandBuffer().
- * src/Util.h (expandBuffer): New function.
- To fix the bug that causes segmentation fault when "-l ." is specified
- in command-line option:
- * src/SimpleLogger.h (SimpleLogger): Removed "filename" argument.
- (openFile): New function.
- (closeFile): New function.
- * src/SimpleLogger.cc (SimpleLogger): Removed fopen.
- (~SimpleLogger): Call closeFile();
- * src/LogFactory.cc (getInstance): Added a call to slogger->openFile().
- * src/main.cc (main): Added a check to see logger is configured
- properly.
-
- To enable HTTP authentication without specifying "--http-auth-scheme"
-
- * src/prefs.h (PREF_HTTP_AUTH_ENABLED): New definition.
- * src/HttpConnection.cc (createRequest): Send Authorization header
- if PREF_HTTP_AUTH_ENABLED == V_TRUE.
- * src/main.cc (main): Preset PREF_HTTP_AUTH_SCHEME to V_TRUE
- If "--http-user" is specified, set PREF_HTTP_AUTH_ENABLED to V_TRUE
- * src/Peer.cc (shouldChoke): Updated algorithm.
-
- * src/message.h (EX_AUTH_FAILED): New definition.
- (EX_FILE_OPEN): New definition.
- * src/HttpResponseCommand.cc (checkResponse): Throw DlAbortEx
- if status == 401.
- (handleDefaultEncoding): Added a call to diskWriter->initAndOpenFile()
- if req->isTorrent == true.
- * src/main.cc (handler): Removed the check to see e->diskWriter != NULL
- (torrentHandler): Removed the check to see diskAdaptor != NULL.
- * src/AbstractDiskWriter.cc (openExistingFile): Updated messsage.
- (createFile): Updated message.
-
- 2006-04-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To add a readout of estimated remaining time to normal HTTP/FTP
- downloads:
-
- * src/ConsoleDownloadEngine.h (startup): New variable.
- (startupLength): New variable.
- (isStartupLengthSet): New variable.
- (avgSpeed): New variable.
- (eta): New variable.
- * src/ConsoleDownloadEngine.cc (sendStatistics): Added a readout of
- estimated remaining time.
- (initStatistics): Initialized newly added variables.
- (calculateStatistics): Calculate average speed and estimated remaining
- time.
- To decouple TorrentDownloadEngine from HttpResponseCommand:
- * src/TrackerDownloadCommand.h: Removed.
- * src/TrackerDownloadCommand.cc: Removed.
- * src/TrackerInitCommand.h: Removed.
- * src/TrackerInitCommand.cc: Removed.
- * src/TrackerUpdateCommand.h: Removed.
- * src/TrackerUpdateCommand.cc: Removed.
- * src/TrackerWatcherCommand.cc (execute): The construction of request
- url written in TrackerInitCommand was moved here. Do not create
- tracker request command if torrentMan->trackers != 0.
- * src/CompactTrackerResponseProcessor.h: New class.
- * src/CompactTrackerResponseProcessor.cc: New class.
- * src/message.h (MSG_TRACKER_WARNING_MESSAGE): Updated.
- * src/HttpResponseCommand.cc (createHttpDownloadCommand):
- Decoupled TorrentDownloadEngine from this.
- * src/SegmentMan.h (init): New function.
- * src/SegmentMan.cc (init): New function.
- * src/TorrentMan.h (responseProcessor): New variable.
- (trackers): New variable.
- (setTrackerResponseProcessor): New function.
- (getTrackerResponseProcessor): New function.
- (processTrackerResponse): New function.
- * src/TorrentMan.cc (Constructor): Initialized new variable trackers.
- (processTrackerResponse): New function.
- * src/main.cc (main): Use ByteArrayDiskWriter and
- CompactTrackerResponseProcessor.
- * src/TorrentDownloadEngine.cc (afterEachIteration): Call torrentMan->
- processTrackerResponse().
-
- * src/TorrentConsoleDownloadEngine.cc (printStatistics): Updated a
- readout.
- * src/TorrentDownloadEngine.cc (afterEachIteration): Added log message
- which indicates download has completed.
- * src/AbstractDiskWriter.cc (Destructor): fd >= 0, not fd >0
- (closeFile): fd >= 0, not fd > 0
- * src/main.cc (main): Added short cut for show-files.
- Added short cut for torrent-file.
- Added new command-line option listen-port.
- Updated i18n messages.
-
- 2006-04-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To add LogFactory which creates singleton logger:
-
- * src/LogFactory.h: New class.
- * src/LogFactory.cc: New class.
- * src/Command.h (logger): New variable.
- (Constructor): Use LogFactory.
- * src/AbstractCommand.cc: Use Command::logger
- * src/PeerConnection.cc (Constructor): Deleted the argument logger.
- Use LogFactory.
- * src/SegmentSplitter.h : Made logger protected.
- * src/SegmentSplitter.cc (Constructor): Use LogFactory.
- * src/SegmentMan.cc (Constructor): Use LogFactory.
- * src/DownloadEngine.h : Made logger protected.
- * src/DownloadEngine.cc (Constructor): Use LogFactory.
- * src/PeerInteractionCommand.cc : Use Command::logger.
- * src/HttpResponseCommand.cc : Use Command::logger.
- * src/SegmentMan.h : Made logger private.
- * src/TorrentMan.h : Made logger private.
- * src/TorrentMan.cc : Use LogFactory.
- * src/FtpNegotiateCommand.cc : Use Command::logger.
- * src/HttpConnection.h (Constructor): Deleted the argument logger.
- * src/HttpConnection.cc (Constructor): Deleted the argument logger.
- Use LogFactory.
- * src/FtpConnection.h (Constructor): Deleted the argument logger.
- * src/FtpConnection.cc (Constructor): Deleted the argument logger.
- Use LogFactory.
- * src/DownloadCommand.cc : Use Command::logger.
- * src/PeerAbstractCommand.cc : Use Command::logger.
- * src/PeerListenCommand.cc : Use Command::logger.
- * src/PeerInitiateConnectionCommand.cc : Use Command::logger.
- * src/HttpInitiateConnectionCommand.cc : Use Command::logger.
- * src/FtpInitiateConnectionCommand.cc : Use Command::logger.
- * src/TrackerWatcherCommand.cc : Use Command::logger.
- * src/TrackerUpdateCommand.cc : Use Command::logger.
- * src/TrackerDownloadCommand.cc : Use Command::logger.
- * src/RequestSlotMan.cc (Constructor): Deleted the argument logger.
- Use LogFactory.
- * src/SendMessageQueue.h (Constructor): Deleted the argument logger.
- * src/SendMessageQueue.cc (Constructor): Deleted the argument logger.
- Use LogFactory.
- * src/main.cc (main): Use LogFactory.
- * src/DiskAdaptor.h (logger): New variable.
- * src/DiskAdaptor.cc (Constructor): Use LogFactory.
- * src/CopyDiskAdaptor.cc (fixFilename): Added a log message.
- 2006-04-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/TrackerInitCommand.cc (TrackerInitCommand): Added a "key"
- parameter to a tracker request.
- * src/TorrentMan.cc (readFileEntryFromMetaInfoFile): Bug fix.
- * src/TrackerWatcherCommand.cc (execute): Call req->resetTryCount().
-
- * src/main.cc (setSignalHander): New function.
- (main): Added a handler for SIGTERM.
- (handler): Updated message.
- (torrentHandler): Updated message.
-
- 2006-04-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/TorrentConsoleDownloadEngine.cc
- (onPartialDownloadingCompletes): Renamed as
- onSelectiveDownloadingCompletes.
- (onSelectiveDownloadingCompletes): Updated message.
- To add DiskAdaptor which abstract DiskWriter family:
- * src/PeerConnection.cc: Use diskAdaptor instead of diskWriter.
- * src/PeerInteractionCommand.cc: Use diskAdaptor instead of diskWriter.
- * src/BitfieldMan.cc (isAllBitSet): bug fix.
- * src/TorrentMan.cc : Included CopyDiskAdaptor.h, DirectDiskAdaptor.h,
- MultiDiskAdaptor.h.
- (readFileEntry): Changed its arguments.
- (setup): setupDiskWriter is merged into this function.
- (setupDiskWriter): Removed.
- (setFileFilter): New function.
- (readFileEntryFromMetaInfoFile): Updated according to the changes
- made in readFileEntry.
- (getFilePath): Removed.
- (getTempFilePath): Removed.
- (getSegmentFilePath): Updated due to the removal of getFilePath.
- (fixFilename): Removed.
- (copySingleFile): Removed.
- (splitMultiFile): Removed.
- (deleteTempFile): Removed.
- (setFileEntriesToDownload): Removed.
- (isPartialDownloadingMode): Renamed as isSelectiveDownloadingMode.
- (isSelectiveDownloadingMode): New function.
- (setAllMultiFileRequestedState): Removed.
- (finishPartialDownloadingMode): Renamed as
- finishSelectiveDownloadingMode.
- (finishSelectiveDownloadingMode): New function.
- (getPartialTotalLength): Renamed as getSelectedTotalLength.
- (getSelectedTotalLength): New function.
- (onDownloadComplete): Use diskAdaptor.
- * src/MultiDiskWriter.cc (Constructor): Added the argument pieceLength
- (Range): Removed.
- (setMultiFileEntries): Renamed as setFileEntries.
- (setFileEntries): New function.
- * src/MultiDiskWriter.h [DiskWriterEntry](enabled): Removed.
- (pieceLength): New variable.
- * src/main.cc (printDownloadCompeleteMessage): New function.
- (torrentHandler): Use diskAdaptor instead of diskWriter.
- (main): Renamed torrent-show-files to show-files.
- Rewritten file contents listing.
- * src/TorrentMan.h (FileEntry): Removed.
- (multiFileTopDir): Removed.
- (multiFileEntries): Removed.
- (diskWriter): Removed.
- (diskAdaptor): New variable.
- * src/DefaultDiskWriter.h (totalLength): New variable.
- * src/DefaultDiskWriter.cc (initAndOpenFile): Added ftruncate.
- * src/TorrentDownloadEngine.cc (onEndOfRun): Use diskAdaptor instead of
- diskWriter.
- * src/TorrentConsoleDownloadEngine.h
- (partialDownloadLengthDiff): Renamed as selectedDownloadLengthDiff.
- (partialTotalLength): Renamed as selectedTotalLength.
- * src/AbstractDiskWriter.cc (openFile): If file exists, call
- openExistingFile, otherwise call initAndOpenFile.
- (closeFile): fd > 0, not fd != 0.
- * src/DirectDiskAdaptor.h: New class.
- * src/DirectDiskAdaptor.cc: New class.
- * src/MultiDiskAdaptor.h: New class.
- * src/MultiDiskAdaptor.cc: New class.
- * src/CopyDiskAdaptor.h: New class.
- * src/CopyDiskAdaptor.cc: New class.
- * src/DiskAdaptor.h: New class.
- * src/DiskAdaptor.cc: New class.
-
- * src/prefs.h (PREF_TORRENT_SHOW_FILES): Renamed as PREF_SHOW_FILES
- (PREF_SHOW_FILES): New definition.
- 2006-04-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To add the ability to download multi torrent into respective files
- directly:
-
- * src/DiskWriter.h (openFile): New function.
- (seek): Removed.
- * src/MultiDiskWriter.h: New class.
- * src/MultiDiskWriter.cc: New class.
- * src/AbstractDiskWriter.h (seek): Changed its scope from public to
- protected.
- (openFile): New function.
- * src/AbstractDiskWriter.cc (openFile): New function.
- * src/prefs.h (V_FALSE): New definition.
- (PREF_DIRECT_FILE_MAPPING): New definition.
- * src/TorrentMan.h (setupDiskWriter): New function.
- (setAllMultiFileRequestedState): New function.
- (onDownloadComplete): New function.
- * src/TorrentMan.cc : Included MultiDiskWriter.h
- (setupDiskWriter): New function.
- (getFilePath): Updated.
- (getTempFilePath): Updated.
- (getSegmentFilePath): Updated.
- (fixFilename): Updated.
- (deleteTempFile): Updated.
- (setAllMultiFileRequestedState): New function.
- (setFileEntriesToDownload): Use setAllMultiFileRequestedState().
- (finishPartialDownloadingMode): Reset requested flags.
- (onDownloadComplete): New function.
- * src/main.cc: Added --direct-file-mapping option.
- Use TorrentMan::setupDiskWriter().
- * src/TorrentDownloadEngine.cc (afterEachIteration): Use TorrentMan::
- onDownloadComplete().
-
-
- To fix ETA bug:
- * src/Util.h (difftvsec): New function.
- * src/Util.cc (difftvsec): New function.
- * src/TorrentConsoleDownloadEngine.cc (calculateSpeed): Use int for the
- type of "elapsed" instead of long long int.
- (calculateStatistics): Use Util::difftvsec instead of Util::difftv.
- The updates of statistics takes place every 1 seconds.
- * src/TorrentConsoleDownloadEngine.h (lastElapsed): Changed its type.
- (calculateSpeed): Changed its argument signature.
-
- * src/PeerMessage.cc (toString): Fixed message.
-
- 2006-04-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To print ETA:
- * src/TorrentDownloadEngine.cc (afterEachIteration): Added download
- completion handling when dealing with
- TorrentMan::isPartialDownloadingMode() == true.
- * src/TorrentDownloadEngine.h (onPartialDownloadingCompletes):
- New function.
- * src/TorrentConsoleDownloadEngine.h (startup): New variable.
- (sessionDownloadLength): New variable.
- (avgSpeed): New variable.
- (eta): New variable.
- * src/TorrentConsoleDownloadEngine.cc (initStatistics): Initialized
- new variables: eta, avgSpeed, startup.
- (calculateSpeed): Calculate average speed and ETA.
- (printStatistics): Added ETA.
- * src/Util.h (secfmt): New function.
- * src/Util.cc (secfmt): New function.
-
- 2006-04-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- To detect "keep alive" flooding:
- * src/PeerInteractionCommand.h (keepAliveCount): New variable
- * src/PeerInteractionCommand.cc (Constructor): Initialized new
- variable: keepAliveCount.
- (detectMessageFlooding): Added "keep alive" flooding detection.
- (receiveMessage): Increase keepAliveCount when "keep alive" message
- received.
-
- To add the ability to download only specified files in multi-file
- torrent:
- * src/BitfieldMan.h (filterBitfield): New variable.
- (filterEnabled): New variable.
- (setFilterBit): New function.
- (enableFilter): New function.
- (disableFilter): New function.
- (isFilterEnabled): New function.
- (getFilteredTotalLength): New function.
- (getCompletedLength): New function.
- * src/BitfieldMan.cc (Constructor): Initialized new variable:
- filterBitfield, filterEnabled.
- (CopyConstructor): Added filterBitfield and filterEnabled.
- (operator==): Added filterBitfield and filterEnabled.
- (Destructor): Added filterBitfield.
- (getMissingIndex): Use filterBitfield.
- (getMissingUnusedIndex): Use filterBitfield.
- (getFirstMissingUnusedIndex): Use filterBitfield.
- (getFirstMissingUnusedIndex): Use filterBitfield.
- (getAllMissingIndexes): Use filterBitfield.
- (countMissingBlock): Use filterBitfield.
- (countBlock): Use filterBitfield.
- (setBitInternal): Added new argument on.
- (setUseBit): Use setBitInternal.
- (unsetUseBit): Use setBitInternal.
- (setBit): Use setBitInternal.
- (unsetBit): Use setBitInternal.
- (isAllBitSet): Use filterBitfield.
- (setFilterBit): New function.
- (addFilter): New function.
- (enableFilter): New function.
- (disableFilter): New function.
- (clearFilter): New function.
- (isFilterEnabled): New function.
- (getFilteredTotalLength): New function.
- (getCompletedLength): New function.
- * src/TorrentMan.h [FileEntry](Constructor): Updated signature.
- Initalized newly added variables.
- [FileEntry](offset): New variable.
- [FileEntry](extracted): New variable.
- [FileEntry](requested): New variable.
- (readFileEntry): New function.
- (option): New variable.
- (splitMultiFile): Removed const qualifier.
- (fixFilename): Removed const qualifier.
- (readFileEntryFromMetaInfoFile): New function.
- (finishPartialDownloadingMode): New function.
- (isPartialDownloadingMode): New function.
- (setFileEntriesToDownload): New function.
- (getCompletedLength): New function.
- (getPartialTotalLength): New function.
- * src/TorrentMan.cc (readFileEntry): New function.
- (setup): Use readFileEntry. If no-preallocation option is specified,
- use DefaultDiskWriter.
- (readFileEntryFromMetaInfoFile): New function.
- (fixFilename): Removed const qualifier.
- (splitMultiFile): Removed const qualifier.
- (setFileEntriesToDownload): New function.
- (isPartialDownloadingMode): New function.
- (finishPartialDownloadingMode): New function.
- (getCompletedLength): New function.
- (getPartialTotalLength): New function.
-
- * src/TorrentConsoleDownloadEngine.h (partialDownloadLengthDiff):
- New variable.
- (partialTotalLength): New variable.
- (downloadLength): New variable.
- (totalLength): New variable.
- * src/TorrentConsoleDownloadEngine.cc (onPartialDownloadingCompletes):
- Added log.
- (initStatistics): Initialized new variables: partialDownloadLengthDiff,
- partialTotalLength, downloadLength, totalLength.
- (calculate): Calculate downloadLength and totalLength.
-
- * src/prefs.h :New definition PREF_NO_PREALLOCATION
- * src/main.cc (addCommand): Changed argument signature.
- (main): Added new variable: args. Added new option "torrent-show-files"
- "no-preallocation". Usage is not updated yet.
-
- 2006-04-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/PeerMessage.cc (setBitfield): Fixed invalid memory de-allocation.
- 2006-04-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- Attempt to add the ability to listing file entries in a .torrent file.
- This feature is not yet complete.
-
- * src/prefs.h (PREF_TORRENT_SHOW_FILES): New definition
- * src/TorrentMan.cc (getMultiFileEntries): New function.
- (getName): New function.
- * src/TorrentMan.h (getMultiFileEntries): New function.
- (getName): New function.
- * src/main.cc (main): Use above 2 funtion.
-
- * Release 0.3.2
-
- 2006-03-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * src/PeerInteractionCommand.cc (checkInactiveConnection): New function
- (detectMessageFlooding): Updated threshold value.
- (checkLongTimePeerChoking): Updated timeout value.
- (getNewPieceAndSendInterest): Added debug log.
- * src/PeerInteractionCommand.h (checkInactiveConnection): New function
-
- * src/TorrentMan.cc (deleteOldErrorPeers): Updated.
- (getPeer): Updated.
- * src/TorrentMan.h: Added MAX_PEER_ERROR.
-
- * src/PeerAbstractCommand.cc (onAbort): Increment error counter.
- * src/PeerListenCommand.cc (execute): Close connection if incoming peer
- is localhost.
- * src/main.cc (main): Updated PREF_PEER_CONNECTION_TIMEOUT to 60.
- * src/PendingMessage.cc (processMessage): Not to send piece message
- if peer is not interested in the pieces localhost has.
- * src/Peer.cc (shouldChoke): Updated.
- * src/SendMessageQueue.cc (cancelAllRequest): Fixed.
- * src/Util.cc (isPowerOf): New function.
- * src/Util.h (isPowerOf): New function.
- * src/PeerMessageUtil.cc (checkLength): Added a check for length
- whether or not it is power of 2.
-
- 2006-03-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- Added new class SendMessageQueue that includes PendingMessages and
- RequestSlotMan.
- * src/SendMessageQueue.h: New class.
- * src/SendMessageQueue.cc: New class.
- * src/PendingMessage.h: Added new member variable blockIndex and its
- accessors.
- (createRequestMessage): Updated.
- * src/PendingMessage.cc (createRequestMessage): Updated.
- * src/PeerInteractionCommand.cc (executeInternal): Updated with
- SendMessageQueue.
- (checkLongTimePeerChoking): Updated with SendMessageQueue.
- (receiveMessage): Updated with SendMessageQueue.
- (deletePendingPieceMessage): Removed.
- (getNewPieceAndSendInterest): Updated with SendMessageQueue.
- (sendInterest): Updated with SendMessageQueue.
- (createRequestPendingMessage): Updated with SendMessageQueue.
- (sendMessages): Updated with SendMessageQueue.
- (onAbort): Updated with SendMessageQueue.
- (keepAlive): Updated with SendMessageQueue.
- (beforeSocketCheck): Updated SendMessageQueue.
- * src/PeerInteractionCommand (sendMessages): Shuffle
- missingBLockIndexes before using it.
-
- Added its own timeout for peer connection.
-
- * src/PeerAbstractCommand.h: Added member variable timeout and its
- setter.
- * src/prefs.h: Added PREF_PEER_CONNECTION_TIMEOUT.
- * src/PeerInteractionCommand.cc (PeerInteractionCommand):
- Added setTimeout() call.
- (executeInternal): Added setTimeout() call.
- * src/PeerAbstractCommand.cc (PeerAbstractCommand):
- Added timeout.
- (isTimeoutDetected): Updated.
- * src/main.cc (main): Added PREF_PEER_CONNECTION_TIMEOUT entry to
- option.
-
- Added *simple* message flooding checker.
-
- * src/PeerInteractionCommand.cc (executeInternal):
- Added detectMessageFlooding() call.
- (detectMessageFlooding): New function.
- (receiveMessage): Count up CHOKE, UNCHOKE, HAVE message.
- (beforeSocketCheck): Added detectMessageFlooding() call.
- * src/PeerInteractionCommand.h: Added sendMessageQueue,
- chokeUnchokeCount, haveCount, detectMessageFlooding().
- Removed deletePendingPieceMessage(), getRequestSlot(),
- deleteRequestSlot(), deleteAllRequestSlot().
-
- * src/PeerInteractionCommand.cc (beforeSocketCheck):
- Added checkLongTimePeerChoking() call.
- * src/RequestSlotMan.h: Renamed deleteTimeoutRequestSlot().
- * src/TorrentMan.cc (addPeer): Delete at most MAX_PEER_LIST_SIZE peers
- if duplicate == false.
- The parameter "uploaded" and "downloaded" in the tracker request are
- the size since the client sent the "started" event to the tracker.
-
- * src/TorrentMan.cc (setup): Assigned saved downloaded Size and
- uploaded size to preDownloadedSize, preUploadedSize respectively.
- * src/TorrentMan.h: Added preDownloadedSize, preUploadedSize,
- getSessionDownloadedSize(), getSessionUploadedSize().
- * src/TrackerInitCommand.cc (execute): Use getSessionDownloadedSize(),
- getSessionUploadedSize() instead of getDownloadedSize(),
- getUploadedSize().
-
- * src/PendingMessage.cc (processMessage): Do not send request message
- if the peer is choking the client.
- * src/TrackerUpdateCommand.cc (execute): Check wtheher minInterval is
- less than interval.
-
- 2006-03-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * configure.in: Added gnutls support. Added several CPP macros.
- * m4/openssl.m4: Added.
- * src/SocketCore.{h,cc}: Drop const quarifier from writeData(),
- readData(), peekData(). Added gnutls support.
- * src/HttpDownloadCommand.cc: Removed SleepCommand.h
- * src/TrackerWatcherCommand.{h,cc}: Added. This command creates
- TrackerInitCommand periodicaly(TorrentMan::minInterval).
- * src/TorrentMan.cc: Remove downloadedSize == 0 check from save().
- Instead, added a check for whether setup method has executed
- successfully.
- * src/TorrentMan.h: Added member vaiable setupComplete. Updated
- DEFAULT_ANNOUNCE_INTERVAL and DEFAULT_ANNOUNCE_MIN_INTERVAL to 300.
- * src/Makefile.am: Updated.
- * src/messageDigest.h: Added. This is a macro calculating SHA1 digest
- using whether OpenSSL or gcrypt, depending on the result of configure
- script.
- * src/ShaVisitor.{h,cc}: Removed direct dependency on OpenSSL by using
- messageDigest.h.
- * src/TorrentAutoSaveCommand.h: Removed unused variable cuid.
- * src/PeerListenCommand.cc: Added log about port binded successfully.
- Fixed memory leak.
- * src/main.cc: Added gnutls support. Replaced LIB_SSL with
- ENABLE_BITTORRENT where they are not related to OpenSSL but BitTorrent.
- Removed instantiation of TrackerInitCommand. Instead,
- TrackerWatcherCommand is instantiated and pushed to the command queue.
- * src/InitiateConnectionCommandFactory.cc: Replaced HAVE_LIBSSL with
- ENABLE_SSL.
- * src/Request.cc: Replaced HAVE_LIBSSL with ENABLE_SSL.
- * src/RequestSlotMan.cc (deleteCompletedRequestSlot):
- If a piece is already acquired by another command, delete the request
- slots for the piece.
- * src/TrackerUpdateCommand.cc (execute):
- Changed log level of MSG_TRACKER_WARNING_MESSAGE from info to warn.
- Added a check whether peer list is null.
- Fixed the bug that causes sending completed event to the tracker
- several times.
- * src/TrackerInitCommand.cc (execute):
- Fixed the bug that causes sending completed event to the tracker
- several times.
- * src/AbstractDiskWriter.{h,cc}: Removed direct dependency on OpenSSL
- by using messageDigest.h.
-
- 2006-03-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * PeerConnection.cc: Replaced log message "keep-alive" with
- "keep alive".
- * PeerInteractionCommand.{h,cc}: Close connection if peer is choking
- localhost long time.
- * TorrentMan.cc: When adding new peer with duplicate = true, if the
- number of peer list is equal to or grater than MAX_PEER_LIST, delete
- at most 100 failure entry from the list. If with duplicate = false,
- MAX_PEER_LIST is not checked.
- * PeerListenCommand.cc: Fixed the argument order of log message.
- 2006-03-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * Logger.h: Moved enum LEVEL from SimpleLogger.h to here.
- Added warn().
- * SimpleLogger.h: Moved enum LEVEL to Logger.h.
- Implemented warn().
- Defined 2 macros(WRITE_LOG, WRITE_LOG_EX) to avoid duplicated code.
-
- 2006-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * Request.h: Added AFTER_COMPLETED event.
- * TorrentDownloadEngine.cc: Prints "Download complete" message
- instead of downloaded size and progress(%) after download completes.
- * PeerInteractionCommand.cc: After download completes, sends unchoke
- message to the peer if it is interested in what localhost has
- downloaded.
- * TorrentMan.cc: In single-file mode, copy temporary file to the final
- destination instead of just renaming it.
- * TorrentMan.cc: Added deleteTempFile().
- * PeerAbstractCommand.cc: do not stop execution after download
- completes. This makes localhost a seeder.
- * Util.{h,cc}: Added fileCopy().
- * PeerListenCommand.cc: do not stop execution after download completes.
- This makes localhost a seeder.
- * main.cc: Do not call TorrentMan::fixFilename() in torrentHandler.
- Added TorrentMan::deleteTempFile() to torrentHandler.
- Initialized the variable dir as ".".
- * TorrentMan.h: Changed DEFAULT_ANNOUNCE_INTERVAL to 120 seconds.
- Deleted renameSingleFile().
- Added copySingleFile(), deleteTempFile().
- * DownloadEngine.h: Added virtual function afterEachIteration().
- * TorrentDownloadEngine.cc: Move a call to TorrentMan::fixFilename()
- in onEndOfRun() to afterEachIteration().
- In onEndOfRun(), changed if condition to check whether filenameFixed is
- true.
- * Util.cc: Implemented fileCopy() using rangedFileCopy().
- In rangedFileCopy(), added try-catch block to properly close file
- descriptors.
- * TorrentDownloadEngine.cc: Added a member variable filenameFixed.
- Added afterEachIteration(), isFilenameFixed().
- * Peer.cc: Changed choking strategy.
- * PreAllocationDiskWriter.cc: Drop O_DIRECT flag.
- * TrackerInitCommand.cc: Send completed event only once.
- * DownloadEngine.cc: Added a call to afterEachIteration().
- * TrackerUpdateCommand.cc: Do not stop execution after download
- completes.
- * TorrentMan.h: Defined MAX_PEER_UPDATE as 15. aria2 attempts to
- connect the peers at most MAX_PEER_UPDATE when a peer list is
- received from a tracker.
- * TrackerUpdateCommand.cc: Implemented above mentioned behavior.
- Decreased the number of failure peers to delete to 0(just comment out
- the line).
- * Release 0.3.1
-
- 2006-03-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * PeerInteractionCommand.cc: added a call to
- TorrentMan::unadvertisePiece in Destructor.
- * PeerInteractionCommand.cc: make have message sent immediately
- if the size of pending message queue is zero.
- * TorrentMan.cc: set the maximum size of peer list to 250.
- * TorrentMan.h: changed the container type of Peers and UsedPieces
- to deque.
- * Util.cc: fixed rangedFileCopy.
- * AbstractDiskWriter.{h,cc}: moved digest context initialization
- to Constructor. Also, moved digest cleanup to Destructor.
- * MetaFileUtil.cc: fixed memory leak
- * replaced std::vector with std::deque.
- * AbstractCommand.cc: casted timeout value to long long int.
- * ChunkedEncoding.cc: fixed memory leak.
- * PeerInteractionCommand.cc: casted timeout value to long long int.
- * SleepCommand.cc: casted timeout value to long long int.
- * Data.cc: fixed memory leak.
- * Data.cc: fixed toLLInt().
- * BitfieldMan.cc: fixed memory leak.
- * TorrentMan.cc: initialized storeDir to ".".
- * TorrentMan.cc: fixed memory leak.
- * TorrentMan.cc: corrected file paths of splitted files.
- * PeerAbstractCommand.cc: casted timeout to long long int.
- * main.cc: added delete(req) and delete(te->diskWriter).
- * RequestSlot.cc: casted timeout value to long long int.
- * Request.cc: fixed memory leak.
- * PendingMessage.cc: make HAVE messages sent only when peer does not
- have the piece.
- * Peer.{h,cc}: added hasPiece(int index).
- * main.cc: corrected addCommand.
-
- 2006-03-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * BitTorrent protocol support added.
- * Release 0.3.0
-
- 2006-03-17 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * SocketCore.cc: remove the assignment of addrinfo.ai_addr.
- 2006-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * ChunkedEncoding.{h,cc}: fixed the bug that if chunk data is binary,
- decoding did not work properly.
- 2006-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * DownloadEngine.h: included sys/time.h
- * DownloadEngine.cc: remove sys/time.h
- * Makefile.am (SUBDIRS): Add intl.
- * configure.in (AC_CONFIG_FILES): Add intl/Makefile.
- 2006-03-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * main.cc: correct help message for --http-auth-scheme.
- * main.cc: changed e-mail address for bug reports.
- * ja.po: added japanese translation.
- 2006-03-04 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * SimpleLogger.cc: flush log file instead of stdout.
- 2006-03-03 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * main.cc: Fixed command-line option: max-tries
- * HttpResponseCommand.cc: Make the request re-sent only if req->seg.sp
- does not equal to seg.sp.
- * DownloadCommand.cc: If EOF is got from the server and the total size
- of file is not zero, then throw DlRetryEx.
- * main.cc: Set the minium value of min-segment-size to 1024.
- * HttpResponseCommand.cc: Fixed the bug that http segmented downloading
- fails because of a regression since 0.2.0 release.
-
- 2006-03-02 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * HttpConnection.cc:
- * common.h: defined the user agent name as macro
- * DownloadEngine.{h, cc}:
- * ConsoleDownloadEngine.{h, cc}: Console output message(size, speed)
- is now generated by ConsoleDownloadEngine not by DownloadEngine.
- * main.cc: Download complete/abort message is now generated by main.
- * Makefile.am (SUBDIRS): Add m4.
- (ACLOCAL_AMFLAGS): New variable.
- (EXTRA_DIST): New variable.
- * configure.in (AC_CONFIG_FILES): Add po/Makefile.in,
- * gettext: added gettext functionality
-
- 2006-03-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * AbstractCommand.cc:
- * DownloadCommand.{h, cc}: Aborted downloading commands now properly
- unregister its cuid from SegmentMan.
- * DownloadEngine.cc: .aria2 file was written when a downloading
- failed with errors.
- * HttpConnection.cc: Added "Proxy-Connection" header to proxy request.
- Added "User-Agent" header to CONNECT proxy request.
- Fixed "Proxy-Authorization" header. Now proxy authorization works
- properly.
- * Logger.h:
- * SimpleLogger.{h,cc}: Changed the type of msg to const char*.
- * ChunkedEncoding.cc: Added #include directive for strings.h
- * Release 0.2.1
-
- 2006-02-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * Util.{h,cc}: added startsWith().
- * CookieBox.cc: rewrited criteriaFind() using Util::startsWith() and
- Util::endsWith().
- * SocketCore.cc: struct addrinfo is now zero-initialized.
- * common.h: added #include directive of limit.h.
- * DownloadEngine.cc: added #include directive of sys/time.h and
- algorithm.
- * Exception.h: added #include directive of stdio.h.
- * AbstractCommand.h: added #include directive of sys/time.h.
- * DownloadCommand.h: added #include directive of sys/time.h.
- * *.h: added #include directive of common.h to all base classes.
- subclasses' one was removed.
- * common.h: defined LONG_LONG_MAX and LONG_LONG_MIN if a compiler
- does not define these macros.
-
- 2006-02-23 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * Release 0.2.0
- * main.cc:
- * HttpInitiateConnectionCommand.{h,cc}:
- * prefs.h:
- * HttpConnection.{h,cc}: added --http-proxy-method option.
- We can now use GET command in http proxy.
- 2006-02-22 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
-
- * SplitSlowestSegmentSplitter.{h,cc}: This class provies algorithm
- that splits slowest segment of SegmentMan::commands vector.
- This is the default split algorithm of aria2.
- * SplitFirstSegmentSplitter.{h,cc}: This class provides algorithm
- that splits first segment of SegmentMan::commands vector.
- * SegmentSplitter.{h,cc}: Added. This class provides split algorithm.
- * DownloadCommand.{h,cc}: Added downloading speed calculation.
- * Segment.h:
- * SegmentMan.cc: Added speed field to Segment.h
- * main.cc: -s option now affects all URLs in command-line arguemtns.
- * HttpResponseCommand.cc: Fixed bug that segment file is not loaded.
- * message.h: Change file size related %d to %lld.
- 2006-02-21 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * FtpInitiateConnectionCommand.{h,cc}:
- * FtpNegotiationCommand.{h,cc}:
- * FtpDownloadCommand.{h,cc}:
- * FtpConnection.{h,cc}: Added FTP support
- * SimpleLogger.cc: Log message now includes time information.
- * main.cc: The value of --http-auth-scheme option is chagned from
- 'BASIC' to 'basic'
- * main.cc: Added --timeout command-line option.
- * main.cc: Added --min-segment-size command-line option.
- * main.cc: Added --max-retries command-line option.
- * prefs.h: option string constants are now defined in prefs.h
-
- 2006-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * AbstractCommand.cc: Fixed timeout bug in AbstractCommand
- * SegmentMan.cc: Added totalSize entry to .aria2 file. No compatibility
- with version 0.1.0's one.
-
- 2006-02-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
- * configure.in: Added --enable-ssl option to configure script.
- * HttpConnection.cc: Make Request-URI an absolute path. Some servers
- cannot permit absoluteURI as Request-URI.
- * HttpConnection.cc: Added Referer support.
- * main.cc: Added referer command-line option.
- * main.cc: Added rety-wait command-line option.
- * Exception.h: Fixed formating bug in Exception::setMsg()
- * SocketCore.{h,cc}:
- * Socket.{h, cc}:
- * Request.cc:
- * InitiateConnectionCommandFactory.cc:
- * HttpRequestCommand.cc: Added HTTPS support.
- * SocketCore.{h,cc}: Added SocketCore. Socket becomes a handle class
- for SocketCore.
- * ChunkedEncoding.cc: Fixed bug in ChunkedEncoding: expanding buffer
- size is wrong
- * DownloadCommand.cc: Fixed bug in DownloadCommand: In Chunked
- Encoding, it wrongly adds to Segment.ds buff length from the socket.
- 2006-02-17 Tatsuhiro Tsujikawa <tsujikawa at rednoah dot com>
-
- * Release 0.1.0
-
|