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

Method SendSessionRequest

libi2pd/NTCP2.cpp:671–683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

669
670
671 void NTCP2Session::SendSessionRequest ()
672 {
673 if (!m_Establisher->CreateSessionRequestMessage (m_Server.GetEstablisherRng ()))
674 {
675 LogPrint (eLogWarning, "NTCP2: Send SessionRequest KDF failed");
676 boost::asio::post (m_Server.GetService (), std::bind (&NTCP2Session::Terminate, shared_from_this ()));
677 return;
678 }
679 // send message
680 m_HandshakeInterval = i2p::util::GetMillisecondsSinceEpoch ();
681 boost::asio::async_write (m_Socket, boost::asio::buffer (m_Establisher->m_Buffer, m_Establisher->m_BufferLen), boost::asio::transfer_all (),
682 std::bind(&NTCP2Session::HandleSessionRequestSent, shared_from_this (), std::placeholders::_1, std::placeholders::_2));
683 }
684
685 void NTCP2Session::HandleSessionRequestSent (const boost::system::error_code& ecode, std::size_t bytes_transferred)
686 {

Callers 1

ClientLoginMethod · 0.45

Calls 3

LogPrintFunction · 0.85

Tested by

no test coverage detected