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

Method HandleConnect

libi2pd/NTCP2.cpp:1957–1971  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1955 }
1956
1957 void NTCP2Server::HandleConnect (const boost::system::error_code& ecode, std::shared_ptr<NTCP2Session> conn, std::shared_ptr<boost::asio::steady_timer> timer)
1958 {
1959 timer->cancel ();
1960 if (ecode)
1961 {
1962 LogPrint (eLogInfo, "NTCP2: Connect error ", ecode.message ());
1963 conn->Terminate ();
1964 }
1965 else
1966 {
1967 LogPrint (eLogDebug, "NTCP2: Connected to ", conn->GetRemoteEndpoint (),
1968 " (", i2p::data::GetIdentHashAbbreviation (conn->GetRemoteIdentity ()->GetIdentHash ()), ")");
1969 conn->ClientLogin ();
1970 }
1971 }
1972
1973 void NTCP2Server::HandleAccept (std::shared_ptr<NTCP2Session> conn, const boost::system::error_code& error)
1974 {

Callers

nothing calls this directly

Calls 5

LogPrintFunction · 0.85
GetIdentHashAbbreviationFunction · 0.85
ClientLoginMethod · 0.80
TerminateMethod · 0.45
GetRemoteIdentityMethod · 0.45

Tested by

no test coverage detected