Tatsuhiro Tsujikawa
694fb307aa
2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Replaced StringFormat with fmt
2010-11-20 09:36:14 +00:00
Tatsuhiro Tsujikawa
812563bb6d
2010-06-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Made protected member variable private. Added accessor funcs.
* src/AbstractBtMessage.cc
* src/AbstractBtMessage.h
* src/BtAllowedFastMessage.cc
* src/BtAllowedFastMessage.h
* src/BtBitfieldMessage.cc
* src/BtBitfieldMessage.h
* src/BtCancelMessage.cc
* src/BtCancelMessage.h
* src/BtChokeMessage.cc
* src/BtChokeMessage.h
* src/BtExtendedMessage.cc
* src/BtHaveAllMessage.cc
* src/BtHaveAllMessage.h
* src/BtHaveMessage.cc
* src/BtHaveMessage.h
* src/BtHaveNoneMessage.cc
* src/BtHaveNoneMessage.h
* src/BtInterestedMessage.cc
* src/BtInterestedMessage.h
* src/BtNotInterestedMessage.cc
* src/BtNotInterestedMessage.h
* src/BtPieceMessage.cc
* src/BtPieceMessage.h
* src/BtPortMessage.cc
* src/BtPortMessage.h
* src/BtRejectMessage.cc
* src/BtRejectMessage.h
* src/BtRequestMessage.cc
* src/BtRequestMessage.h
* src/BtUnchokeMessage.cc
* src/BtUnchokeMessage.h
* src/SimpleBtMessage.cc
* src/SimpleBtMessage.h
2010-06-11 11:48:22 +00:00
Tatsuhiro Tsujikawa
4db349c1f3
2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Untabify. Fixed one line in copyright which is longer than 80
columns.
* src
* test
2010-01-05 16:01:46 +00:00
Tatsuhiro Tsujikawa
d9e29e5c7d
2009-11-22 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added _metadataGetMode member variable. It toggles the action when
messages are received: usually they almost do nothing if
_metadataGetMode is true.
* src/AbstractBtMessage.cc
* src/AbstractBtMessage.h
* src/BtAllowedFastMessage.cc
* src/BtBitfieldMessage.cc
* src/BtCancelMessage.cc
* src/BtChokeMessage.cc
* src/BtHaveAllMessage.cc
* src/BtHaveMessage.cc
* src/BtInterestedMessage.cc
* src/BtNotInterestedMessage.cc
* src/BtPieceMessage.cc
* src/BtRejectMessage.cc
* src/BtRequestMessage.cc
* src/BtUnchokeMessage.cc
2009-11-22 13:33:35 +00:00
Tatsuhiro Tsujikawa
5f966f6327
2009-07-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Disconnect seeder if client is also in seed state.
* src/BtBitfieldMessage.cc
* src/BtHaveAllMessage.cc
* src/BtHaveMessage.cc
* src/message.h
* test/BtBitfieldMessageTest.cc
* test/BtHaveAllMessageTest.cc
* test/BtHaveMessageTest.cc
* test/MockPieceStorage.h
2009-07-06 15:22:06 +00:00
Tatsuhiro Tsujikawa
20e215047c
2009-05-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Added source filename(__FILE__) and line number(__LINE__) to
exception message.
* src/AbstractCommand.cc
* src/AbstractDiskWriter.cc
* src/AbstractProxyResponseCommand.cc
* src/BDE.h
* src/BtAllowedFastMessage.cc
* src/BtHandshakeMessageValidator.h
* src/BtHaveAllMessage.cc
* src/BtHaveNoneMessage.cc
* src/BtPieceMessage.cc
* src/BtRejectMessage.cc
* src/ChunkedDecoder.cc
* src/CookieStorage.cc
* src/DHTAnnouncePeerMessage.cc
* src/DHTEntryPointNameResolveCommand.cc
* src/DHTMessageFactoryImpl.cc
* src/DHTMessageTracker.cc
* src/DHTRoutingTableDeserializer.cc
* src/DHTRoutingTableSerializer.cc
* src/DHTSetup.cc
* src/DHTTokenTracker.cc
* src/DefaultBtAnnounce.cc
* src/DefaultBtContext.cc
* src/DefaultBtInteractive.cc
* src/DefaultBtMessageFactory.cc
* src/DefaultBtProgressInfoFile.cc
* src/DefaultExtensionMessageFactory.cc
* src/DlAbortEx.h
* src/DlRetryEx.h
* src/DownloadCommand.cc
* src/DownloadEngineFactory.cc
* src/DownloadFailureException.h
* src/Exception.cc
* src/Exception.h
* src/ExpatMetalinkProcessor.cc
* src/ExpatXmlRpcRequestProcessor.cc
* src/FallocFileAllocationIterator.cc
* src/FatalException.h
* src/FtpConnection.cc
* src/FtpFinishDownloadCommand.cc
* src/FtpInitiateConnectionCommand.cc
* src/FtpNegotiationCommand.cc
* src/GZipDecoder.cc
* src/HandshakeExtensionMessage.cc
* src/HttpConnection.cc
* src/HttpHeaderProcessor.cc
* src/HttpInitiateConnectionCommand.cc
* src/HttpResponse.cc
* src/HttpResponseCommand.cc
* src/HttpServer.cc
* src/HttpSkipResponseCommand.cc
* src/InitiateConnectionCommandFactory.cc
* src/IteratableChunkChecksumValidator.cc
* src/LibgcryptARC4Context.h
* src/LibgcryptARC4Decryptor.h
* src/LibgcryptARC4Encryptor.h
* src/LibgcryptDHKeyExchange.h
* src/LibgnutlsTLSContext.cc
* src/LibsslARC4Context.h
* src/LibsslARC4Decryptor.h
* src/LibsslARC4Encryptor.h
* src/LibsslDHKeyExchange.h
* src/LibsslTLSContext.cc
* src/MSEHandshake.cc
* src/MessageDigestHelper.cc
* src/MetalinkHelper.cc
* src/MultiDiskAdaptor.cc
* src/NameMatchOptionHandler.h
* src/NameResolver.cc
* src/Netrc.cc
* src/NsCookieParser.cc
* src/OptionHandlerException.cc
* src/OptionHandlerException.h
* src/OptionHandlerImpl.h
* src/OptionParser.cc
* src/ParameterizedStringParser.cc
* src/PeerAbstractCommand.cc
* src/PeerConnection.cc
* src/PeerMessageUtil.cc
* src/PeerReceiveHandshakeCommand.cc
* src/Platform.cc
* src/ReceiverMSEHandshakeCommand.cc
* src/RecoverableException.h
* src/RequestGroup.cc
* src/SimpleLogger.cc
* src/SocketCore.cc
* src/Sqlite3MozCookieParser.cc
* src/UTPexExtensionMessage.cc
* src/Util.cc
* src/XML2SAXMetalinkProcessor.cc
* src/Xml2XmlRpcRequestProcessor.cc
* src/XmlRpcMethodImpl.cc
* src/bencode.cc
* src/download_helper.cc
* src/messageDigest.h
* test/ExceptionTest.cc
* test/TestUtil.cc
2009-05-18 15:07:15 +00:00
Tatsuhiro Tsujikawa
15582ed8cd
2009-03-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
Refactored BtMessage subclasses. BtCancelMessage,
BtRequestMessage and BtRejectMessage are derived from
RangeBtMessage class.
BtAllowedFastMessage, BtHaveMessage and BtSuggestPieceMessage
are derived from IndexBtMessage class. BtChokeMessage,
BtHaveAllMessage, BtHaveNoneMessage, BtInterestedMessage,
BtNotInterestedMessage and BtUnchokeMessage are derived from
ZeroBtMessage class.
* src/AbstractBtMessage.cc
* src/AbstractBtMessage.h
* src/BtAllowedFastMessage.cc
* src/BtAllowedFastMessage.h
* src/BtAllowedFastMessageValidator.h: Removed
* src/BtBitfieldMessage.cc
* src/BtBitfieldMessage.h
* src/BtCancelMessage.cc
* src/BtCancelMessage.h
* src/BtCancelMessageValidator.h: Removed
* src/BtChokeMessage.cc
* src/BtChokeMessage.h
* src/BtExtendedMessage.cc
* src/BtExtendedMessage.h
* src/BtHandshakeMessage.cc
* src/BtHandshakeMessage.h
* src/BtHaveAllMessage.cc
* src/BtHaveAllMessage.h
* src/BtHaveMessage.cc
* src/BtHaveMessage.h
* src/BtHaveMessageValidator.h: Removed
* src/BtHaveNoneMessage.cc
* src/BtHaveNoneMessage.h
* src/BtInterestedMessage.cc
* src/BtInterestedMessage.h
* src/BtKeepAliveMessage.cc
* src/BtKeepAliveMessage.h
* src/BtNotInterestedMessage.cc
* src/BtNotInterestedMessage.h
* src/BtPieceMessage.cc
* src/BtPieceMessage.h
* src/BtPortMessage.cc
* src/BtPortMessage.h
* src/BtRejectMessage.cc
* src/BtRejectMessage.h
* src/BtRejectMessageValidator.h: Removed
* src/BtRequestMessage.cc
* src/BtRequestMessage.h
* src/BtRequestMessageValidator.h: Removed
* src/BtSuggestPieceMessage.cc
* src/BtSuggestPieceMessage.h
* src/BtSuggestPieceMessageValidator.h: Removed
* src/BtUnchokeMessage.cc
* src/BtUnchokeMessage.h
* src/DefaultBtMessageFactory.cc
* src/IndexBtMessage.cc
* src/IndexBtMessage.h
* src/IndexBtMessageValidator.h
* src/Makefile.am
* src/PeerMessageUtil.cc
* src/PeerMessageUtil.h
* src/RangeBtMessage.cc
* src/RangeBtMessage.h
* src/RangeBtMessageValidator.h
* src/SimpleBtMessage.cc
* src/SimpleBtMessage.h
* src/ZeroBtMessage.cc
* src/ZeroBtMessage.h
* test/BtRequestMessageTest.cc
2009-03-12 15:54:43 +00:00
Tatsuhiro Tsujikawa
4e0c03500c
2009-03-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
...
BtMessage now holds _id attribute. MESSAGE_LENGTH that is
declared as non-const previously is now const and defined in
class definition.
* src/AbstractBtMessage.cc
* src/AbstractBtMessage.h
* src/BtAllowedFastMessage.cc
* src/BtAllowedFastMessage.h
* src/BtBitfieldMessage.h
* src/BtCancelMessage.cc
* src/BtCancelMessage.h
* src/BtChokeMessage.cc
* src/BtChokeMessage.h
* src/BtExtendedMessage.cc
* src/BtExtendedMessage.h
* src/BtHandshakeMessage.cc
* src/BtHandshakeMessage.h
* src/BtHaveAllMessage.cc
* src/BtHaveAllMessage.h
* src/BtHaveMessage.cc
* src/BtHaveMessage.h
* src/BtHaveNoneMessage.cc
* src/BtHaveNoneMessage.h
* src/BtInterestedMessage.cc
* src/BtInterestedMessage.h
* src/BtKeepAliveMessage.cc
* src/BtKeepAliveMessage.h
* src/BtMessage.h
* src/BtNotInterestedMessage.cc
* src/BtNotInterestedMessage.h
* src/BtPieceMessage.h
* src/BtPortMessage.cc
* src/BtPortMessage.h
* src/BtRejectMessage.cc
* src/BtRejectMessage.h
* src/BtRequestMessage.cc
* src/BtRequestMessage.h
* src/BtSuggestPieceMessage.cc
* src/BtSuggestPieceMessage.h
* src/BtUnchokeMessage.cc
* src/BtUnchokeMessage.h
* src/SimpleBtMessage.cc
* src/SimpleBtMessage.h
* test/MockBtMessage.h
2009-03-11 15:44:04 +00:00
Tatsuhiro Tsujikawa
5c8db1cc20
2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Made string literal to static const std::string
* src/BtChokeMessage.cc (toString)
* src/BtHaveAllMessage.cc (toString)
* src/BtHaveNoneMessage.cc (toString)
* src/BtInterestedMessage.cc (toString)
* src/BtNotInterestedMessage.cc (toString)
* src/BtUnchokeMessage.cc (toString)
2008-05-13 14:25:27 +00:00
Tatsuhiro Tsujikawa
a702d60666
2008-05-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Implemented rarest piece first piece selection strategy.
* src/AbstractBtMessage.cc
* src/AbstractBtMessage.h
* src/BitfieldMan.cc
* src/BitfieldMan.h
* src/BtBitfieldMessage.cc
* src/BtHaveAllMessage.cc
* src/BtHaveMessage.cc
* src/DefaultPieceStorage.cc
* src/DefaultPieceStorage.h
* src/PeerInteractionCommand.cc
* src/PieceStorage.h
* src/UnknownLengthPieceStorage.h
2008-05-11 01:22:32 +00:00
Tatsuhiro Tsujikawa
1ef99931e1
2008-04-27 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Rewritten Exception class. Throw exception object, not its pointer and
catch by reference, so that remove problematic delete operator for
catched exception.
* src/Exception.cc
* src/Exception.h
* test/ExceptionTest.cc
* src/*: All files throwing/catching exception.
* test/*: All files throwing/catching exception.
2008-04-27 02:22:14 +00:00
Tatsuhiro Tsujikawa
3505201f33
2008-04-20 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Rewritten SharedHandle. Now copy constructor taking raw pointer
has
keyword explicit and SharedHandle's default constructor
initializes
its internal obj to null, old implementation initializes it
using
obj's default constructor.
To assign null, write SharedHandle<T> x(...); x.reset();
TODO: test/SharedHandleTest.cc needs more tests.
* src/SharedHandle.h
2008-04-20 00:50:22 +00:00
Tatsuhiro Tsujikawa
032c7c2808
2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
type cleanup for allmost all remaining files.
2008-03-09 12:24:01 +00:00
Tatsuhiro Tsujikawa
1b7c198289
2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Removed "using namespace std;" from all sources. Appended std::
prefix to c++
standard classes.
Included string.h where mem* function are used.
2008-02-08 15:53:45 +00:00
Tatsuhiro Tsujikawa
cd9e35bc63
2007-01-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
* src/message.h: Added EX_INVALID_PAYLOAD_SIZE and
EX_INVALID_BT_MESSAGE_ID. Following source files affected.
* src/BtAllowedFastMessage.cc:
* src/BtBitfieldMessage.cc
* src/BtCancelMessage.cc
* src/BtChokeMessage.cc
* src/BtHaveAllMessage.cc
* src/BtHaveMessage.cc
* src/BtHaveNoneMessage.cc
* src/BtInterestedMessage.cc
* src/BtNotInterestedMessage.cc
* src/BtPieceMessage.cc
* src/BtPortMessage.cc
* src/BtRejectMessage.cc
* src/BtRequestMessage.cc
* src/BtSuggestPieceMessage.cc
* src/BtUnchokeMessage.cc
* src/message.h: Added EX_INVALID_CHUNK_CHECKSUM. Following
source
files are affected.
* src/ChunkChecksumValidator.cc
* src/SegmentMan.cc
2007-01-25 16:47:29 +00:00
Tatsuhiro Tsujikawa
a413cb50f7
2006-12-24 15:55:59 +00:00
Tatsuhiro Tsujikawa
9c3e8fbd9c
2006-12-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
...
Rewritten a portion of bittorrent implementation:
* src/BtMessageValidator.h: New class.
* src/BtBitfieldMessageValidator.h: New class.
* src/BtHandshakeMessageValidator.h: New class.
* src/BtRequestMessageValidator.h: New class.
* src/BtSuggestPieceMessageValidator.h: New class.
* src/BtAllowedFastMessageValidator.h: New class.
* src/BtRejectMessageValidator.h: New class.
* src/BtCancelMessageValidator.h: New class.
* src/BtPieceMessageValidator.h: New class.
* src/BtHaveMessageValidator.h: New class.
* src/BtEventListener.h: New class.
* src/AbstractBtEventListener.h: New class.
* src/BtEvent.h: New class.
* src/BtChokingEvent.h: New class.
* src/BtChokedEvent.h: New class.
* src/BtCancelSendingPieceEvent.h: New class.
* src/BtAbortOutstandingRequestEvent.h: New class.
* src/Randomizer.h: New class.
* src/SimpleRandomizer.h: New class.
* src/BtMessage.h: New class.
* src/AbstractBtMessage.h: New class.
* src/SimpleBtMessage.h: New class.
* src/BtHaveMessage.h: New class.
* src/BtInterestedMessage.h: New class.
* src/BtAllowedFastMessage.h: New class.
* src/BtUnchokeMessage.h: New class.
* src/BtCancelMessage.h: New class.
* src/BtNotInterestedMessage.h: New class.
* src/BtChokeMessage.h: New class.
* src/BtHaveNoneMessage.h: New class.
* src/BtHandshakeMessage.h: New class.
* src/BtSuggestPieceMessage.h: New class.
* src/BtHaveMessage.h: New class.
* src/BtPieceMessage.h: New class.
* src/BtHaveAllMessage.h: New class.
* src/BtKeepAliveMessage.h: New class.
* src/BtPortMessage.h: New class.
* src/BtRejectMessage.h: New class.
* src/BtBitfieldMessage.h: New class.
* src/BtRequestMessage.h: New class.
* src/DefaultBtRequestFactory.h: New class.
* src/DefaultBtMessageReceiver.h: New class.
* src/BtInteractive.h: New class.
* src/BtMessageDispatcher.h: New class.
* src/DefaultBtMessageDispatcher.h: New class.
* src/DefaultBtInteractive.h: New class.
* src/BitfieldManFactory.h: New class.
* src/HandleRegistry.h: New class.
* src/BtMessageFactory.h: New class.
* src/BtMessageReceiver.h: New class.
* src/DefaultBtMessageFactory.h: New class.
* src/PeerObject.h: New class.
* src/BtRequestFactory.h: New class.
2006-12-24 06:25:21 +00:00