/* */ #include "BtUnchokeMessage.h" #include "Peer.h" namespace aria2 { const std::string BtUnchokeMessage::NAME("unchoke"); BtUnchokeMessage::BtUnchokeMessage():ZeroBtMessage(ID, NAME) {} SharedHandle BtUnchokeMessage::create (const unsigned char* data, size_t dataLength) { return ZeroBtMessage::create(data, dataLength); } void BtUnchokeMessage::doReceivedAction() { if(isMetadataGetMode()) { return; } getPeer()->peerChoking(false); } bool BtUnchokeMessage::sendPredicate() const { return getPeer()->amChoking(); } void BtUnchokeMessage::onSendComplete() { getPeer()->amChoking(false); } } // namespace aria2