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

Method HandleSessionRequestPaddingReceived

libi2pd/NTCP2.cpp:765–782  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

763 }
764
765 void NTCP2Session::HandleSessionRequestPaddingReceived (const boost::system::error_code& ecode, std::size_t bytes_transferred)
766 {
767 if (ecode)
768 {
769 LogPrint (eLogWarning, "NTCP2: SessionRequest padding read error: ", ecode.message ());
770 Terminate ();
771 }
772 else
773 {
774 boost::asio::post (m_Server.GetEstablisherService (),
775 [s = shared_from_this (), paddingLength = bytes_transferred] ()
776 {
777 if (paddingLength < s->m_Establisher->m_BufferLen)
778 s->m_Establisher->ApplyPadding (s->m_Establisher->m_Buffer + s->m_Establisher->m_BufferLen - paddingLength, paddingLength);
779 s->SendSessionCreated ();
780 });
781 }
782 }
783
784#if OPENSSL_PQ
785 void NTCP2Session::HandleSessionRequestMLKEMReceived (const boost::system::error_code& ecode, std::size_t bytes_transferred)

Callers

nothing calls this directly

Calls 3

LogPrintFunction · 0.85
ApplyPaddingMethod · 0.80
SendSessionCreatedMethod · 0.45

Tested by

no test coverage detected