mirror of https://github.com/aria2/aria2
2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Send have message to peer if it already has the piece. * src/BtHaveMessage.{h, cc}pull/1/head
parent
20eb571ba1
commit
e707ba0a6c
|
@ -1,3 +1,8 @@
|
||||||
|
2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Send have message to peer if it already has the piece.
|
||||||
|
* src/BtHaveMessage.{h, cc}
|
||||||
|
|
||||||
2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2007-12-25 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Removed incomingPeer. Set 0 to peer's port if it is not a listening
|
Removed incomingPeer. Set 0 to peer's port if it is not a listening
|
||||||
|
|
|
@ -55,10 +55,6 @@ void BtHaveMessage::doReceivedAction() {
|
||||||
peer->updateBitfield(index, 1);
|
peer->updateBitfield(index, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BtHaveMessage::sendPredicate() const {
|
|
||||||
return !peer->hasPiece(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t BtHaveMessage::MESSAGE_LENGTH = 9;
|
int32_t BtHaveMessage::MESSAGE_LENGTH = 9;
|
||||||
|
|
||||||
const unsigned char* BtHaveMessage::getMessage() {
|
const unsigned char* BtHaveMessage::getMessage() {
|
||||||
|
|
|
@ -71,8 +71,6 @@ public:
|
||||||
|
|
||||||
virtual int32_t getMessageLength();
|
virtual int32_t getMessageLength();
|
||||||
|
|
||||||
virtual bool sendPredicate() const;
|
|
||||||
|
|
||||||
virtual string toString() const;
|
virtual string toString() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue