/* */ #include "ZeroBtMessage.h" #include "bittorrent_helper.h" namespace aria2 { ZeroBtMessage::ZeroBtMessage(uint8_t id, const char* name) : SimpleBtMessage{id, name} { } std::vector ZeroBtMessage::createMessage() { /** * len --- 1, 4bytes * id --- ?, 1byte * total: 5bytes */ auto msg = std::vector(MESSAGE_LENGTH); bittorrent::createPeerMessageString(msg.data(), MESSAGE_LENGTH, 1, getId()); return msg; } std::string ZeroBtMessage::toString() const { return getName(); } } // namespace aria2