|
|
Makes packet, finalizing the packet generation.
This function writes the packet header, and (optionally) compresses the packet data if m_proto == PR_ZLIB
- Parameters:
-
| data | Data to make packet of. Assumes data[0] is opcode |
| hexDump | If set to true, the packet data is printed to stdout |
- Returns:
- Packet ready for sending to target
Definition at line 143 of file packets.cpp.
References COL_COMP, COL_SEND, Zlib::compress(), Zlib::decompress(), m_proto, OP_PACKEDCHUNK, OP_SENDINGCHUNK, PR_ED2K, PR_ZLIB, and ED2KPacket::s_overheadUpSize.
Referenced by ED2KPacket::Signature::operator std::string(), ED2KPacket::PublicKey::operator std::string(), ED2KPacket::SecIdentState::operator std::string(), ED2KPacket::ChangeId::operator std::string(), ED2KPacket::Message::operator std::string(), ED2KPacket::AnswerSources::operator std::string(), ED2KPacket::SourceExchReq::operator std::string(), ED2KPacket::CancelTransfer::operator std::string(), ED2KPacket::PackedChunk::operator std::string(), ED2KPacket::DataChunk::operator std::string(), ED2KPacket::ReqChunks::operator std::string(), ED2KPacket::MuleQueueRank::operator std::string(), ED2KPacket::QueueRanking::operator std::string(), ED2KPacket::AcceptUploadReq::operator std::string(), ED2KPacket::StartUploadReq::operator std::string(), ED2KPacket::HashSet::operator std::string(), ED2KPacket::ReqHashSet::operator std::string(), ED2KPacket::FileStatus::operator std::string(), ED2KPacket::NoFile::operator std::string(), ED2KPacket::SetReqFileId::operator std::string(), ED2KPacket::FileDesc::operator std::string(), ED2KPacket::FileName::operator std::string(), ED2KPacket::ReqFile::operator std::string(), ED2KPacket::MuleInfo::operator std::string(), ED2KPacket::ReqSources::operator std::string(), ED2KPacket::ReqCallback::operator std::string(), ED2KPacket::Search::operator std::string(), ED2KPacket::OfferFiles::operator std::string(), ED2KPacket::GetServerList::operator std::string(), ED2KPacket::LoginRequest::operator std::string(), and ED2KPacket::Hello::save(). |