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

Method SendSessionCreateReplyOk

libi2pd_client/SAM.cpp:511–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

509 }
510
511 void SAMSocket::SendSessionCreateReplyOk ()
512 {
513 auto session = m_Owner.FindSession(m_ID);
514 if (session)
515 {
516 std::string priv = session->GetLocalDestination ()->GetPrivateKeys ().ToBase64 ();
517#ifdef _MSC_VER
518 size_t l2 = sprintf_s (m_Buffer, SAM_SOCKET_BUFFER_SIZE, SAM_SESSION_CREATE_REPLY_OK, priv.c_str ());
519#else
520 size_t l2 = snprintf (m_Buffer, SAM_SOCKET_BUFFER_SIZE, SAM_SESSION_CREATE_REPLY_OK, priv.c_str ());
521#endif
522 SendMessageReply ({m_Buffer, l2}, false);
523 }
524 }
525
526 void SAMSocket::ProcessStreamConnect (char * buf, size_t len, size_t rem)
527 {

Callers

nothing calls this directly

Calls 3

ToBase64Method · 0.80
FindSessionMethod · 0.45
GetLocalDestinationMethod · 0.45

Tested by

no test coverage detected