123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040 |
- 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/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
-
|