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

Method SendSessionCreated

libi2pd/NTCP2.cpp:803–815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

801#endif
802
803 void NTCP2Session::SendSessionCreated ()
804 {
805 if (!m_Establisher->CreateSessionCreatedMessage (m_Server.GetEstablisherRng ()))
806 {
807 LogPrint (eLogWarning, "NTCP2: Send SessionCreated KDF failed");
808 boost::asio::post (m_Server.GetService (), std::bind (&NTCP2Session::Terminate, shared_from_this ()));
809 return;
810 }
811 // send message
812 m_HandshakeInterval = i2p::util::GetMillisecondsSinceEpoch ();
813 boost::asio::async_write (m_Socket, boost::asio::buffer (m_Establisher->m_Buffer, m_Establisher->m_BufferLen), boost::asio::transfer_all (),
814 std::bind(&NTCP2Session::HandleSessionCreatedSent, shared_from_this (), std::placeholders::_1, std::placeholders::_2));
815 }
816
817 void NTCP2Session::HandleSessionCreatedReceived (const boost::system::error_code& ecode, std::size_t bytes_transferred)
818 {

Calls 3

LogPrintFunction · 0.85

Tested by

no test coverage detected