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

Method Established

libi2pd_client/BOB.cpp:19–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17namespace client
18{
19 void BOBI2PTunnelIncomingConnection::Established ()
20 {
21 if (m_IsQuiet)
22 StreamReceive ();
23 else
24 {
25 // send destination first like received from I2P
26 std::string dest = GetStream ()->GetRemoteIdentity ()->ToBase64 ();
27 dest += "\n";
28 if (dest.size() <= I2P_TUNNEL_CONNECTION_BUFFER_SIZE)
29 memcpy (GetStreamBuffer (), dest.c_str (), dest.size ());
30 else
31 memset (GetStreamBuffer (), 0, I2P_TUNNEL_CONNECTION_BUFFER_SIZE);
32 HandleStreamReceive (boost::system::error_code (), dest.size ());
33 }
34 Receive ();
35 }
36
37 BOBI2PInboundTunnel::BOBI2PInboundTunnel (const boost::asio::ip::tcp::endpoint& ep, std::shared_ptr<ClientDestination> localDestination):
38 BOBI2PTunnel (localDestination), m_Acceptor (localDestination->GetService (), ep)

Callers

nothing calls this directly

Calls 2

ToBase64Method · 0.80
GetRemoteIdentityMethod · 0.45

Tested by

no test coverage detected