MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / HandleDataMessagePayload

Method HandleDataMessagePayload

libi2pd/Streaming.cpp:2409–2423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2407 }
2408
2409 void StreamingDestination::HandleDataMessagePayload (const uint8_t * buf, size_t len,
2410 i2p::garlic::ECIESX25519AEADRatchetSession * from)
2411 {
2412 // unzip it
2413 Packet * uncompressed = NewPacket ();
2414 uncompressed->offset = 0;
2415 uncompressed->len = m_Inflator.Inflate (buf, len, uncompressed->buf, MAX_PACKET_SIZE);
2416 if (uncompressed->len)
2417 {
2418 uncompressed->from = from;
2419 HandleNextPacket (uncompressed);
2420 }
2421 else
2422 DeletePacket (uncompressed);
2423 }
2424
2425 std::shared_ptr<I2NPMessage> StreamingDestination::CreateDataMessage (
2426 const uint8_t * payload, size_t len, uint16_t toPort, bool checksum, bool gzip)

Callers

nothing calls this directly

Calls 1

InflateMethod · 0.80

Tested by

no test coverage detected