Lines Matching defs:packet
172 CPacket* packet = new CPacket(dataStartupLoadReq, OP_EDONKEYPROT, OP_STARTUPLOADREQ);
173 theStats::AddUpOverheadFileRequest(packet->GetPacketSize());
175 SendPacket(packet, true, true);
267 CPacket* packet = new CPacket(dataFileReq, OP_EMULEPROT, (SupportExtMultiPacket() ? OP_MULTIPACKET_EXT : OP_MULTIPACKET));
268 theStats::AddUpOverheadFileRequest(packet->GetPacketSize());
271 SendPacket(packet, true);
280 CPacket* packet = new CPacket(dataFileReq, OP_EDONKEYPROT, OP_REQUESTFILENAME);
281 theStats::AddUpOverheadFileRequest(packet->GetPacketSize());
283 SendPacket(packet, true);
289 // Sending the packet could have deleted the client, check m_reqfile
293 packet = new CPacket(dataSetReqFileID, OP_EDONKEYPROT, OP_SETREQFILEID);
294 theStats::AddUpOverheadFileRequest(packet->GetPacketSize());
296 SendPacket(packet, true);
304 // Sending the packet could have deleted the client, check m_reqfile
317 packet = new CPacket(packetdata, OP_EMULEPROT, SupportsSourceExchange2() ? OP_REQUESTSOURCES2 : OP_REQUESTSOURCES);
319 theStats::AddUpOverheadSourceExchange(packet->GetPacketSize());
321 SendPacket(packet,true,true);
325 // Sending the packet could have deleted the client, check m_reqfile
327 packet = new CPacket(OP_AICHFILEHASHREQ,16,OP_EMULEPROT);
328 packet->Copy16ToDataBuffer((const char *)m_reqfile->GetFileHash().GetHash());
329 theStats::AddUpOverheadOther(packet->GetPacketSize());
331 SendPacket(packet,true,true);
368 CPacket* packet = new CPacket(OP_HASHSETREQUEST,16, OP_EDONKEYPROT);
369 packet->Copy16ToDataBuffer((const char *)m_reqfile->GetFileHash().GetHash());
370 theStats::AddUpOverheadFileRequest(packet->GetPacketSize());
372 SendPacket(packet,true,true);
472 CPacket* packet = new CPacket(OP_HASHSETREQUEST,16, OP_EDONKEYPROT);
473 packet->Copy16ToDataBuffer((const char *)m_reqfile->GetFileHash().GetHash());
474 theStats::AddUpOverheadFileRequest(packet->GetPacketSize());
476 SendPacket(packet, true, true);
573 void CUpDownClient::ProcessHashSet(const byte* packet, uint32 size)
575 if ((!m_reqfile) || md4cmp(packet,m_reqfile->GetFileHash().GetHash())) {
581 CMemFile data(packet,size);
661 CPacket* packet = new CPacket(OP_CANCELTRANSFER, 0, OP_EDONKEYPROT);
662 theStats::AddUpOverheadFileRequest(packet->GetPacketSize());
667 slower_client->SendPacket(packet,true,true);
703 CPacket* packet = NULL;
707 // ED2Kv2 packet...
734 packet = new CPacket(data, OP_ED2KV2HEADER, OP_REQUESTPARTS);
812 packet = new CPacket(data, (bHasLongBlocks ? OP_EMULEPROT : OP_EDONKEYPROT), (bHasLongBlocks ? (uint8)OP_REQUESTPARTS_I64 : (uint8)OP_REQUESTPARTS));
820 if (packet) {
821 theStats::AddUpOverheadFileRequest(packet->GetPacketSize());
822 SendPacket(packet, true, true);
846 void CUpDownClient::ProcessBlockPacket(const byte* packet, uint32 size, bool packed, bool largeblocks)
865 // Read data from packet
866 const CMemFile data(packet, size);
897 // Check that packet size matches the declared data size + header size
946 lenWritten = m_reqfile->WriteToBuffer( size - header_size, (byte*)(packet + header_size), nStartPos, nEndPos, cur_block->block, this);
960 // Try to unzip the packet
961 int result = unzip(cur_block, (byte*)(packet + header_size), (size - header_size), &unzipped, &lenUnzipped);
976 CFormat(wxT("Corrupted compressed packet for '%s' received (error 666)")) % m_reqfile->GetFileName());
995 CFormat(wxT("Corrupted compressed packet for '%s' received (error %i): %s"))
1055 error += CFormat(wxT("data packet: RS: %i HS: %i SP: %i EP: %i BS: %i -> "))
1204 CPacket* packet = new CPacket(OP_CANCELTRANSFER, 0, OP_EDONKEYPROT);
1205 theStats::AddUpOverheadFileRequest(packet->GetPacketSize());
1207 SendPacket(packet,true,true);
1611 CPacket* packet = new CPacket(data, OP_EMULEPROT, OP_AICHREQUEST);
1612 theStats::AddUpOverheadOther(packet->GetPacketSize());
1614 SafeSendPacket(packet);
1617 void CUpDownClient::ProcessAICHAnswer(const byte* packet, uint32 size)
1624 CMemFile data(packet, size);
1652 AddDebugLogLineN( logAICHTransfer, wxT("AICH Packet Answer: requested values differ from values in packet") );
1659 void CUpDownClient::ProcessAICHRequest(const byte* packet, uint32 size)
1665 CMemFile data(packet, size);