Skip to content

PingSession

#include <ping_session.hpp>

Inherits from std::enable_shared_from_this< PingSession >

Public Functions

Name
PingSession(std::shared_ptr< boost::asio::io_context > io, std::shared_ptr< libp2p::Host > host)
void Init()
void OnSessionPing(libp2p::outcome::result< std::shared_ptr< libp2p::protocol::PingClientSession > > session)
void OnNewConnection(const std::weak_ptr< libp2p::connection::CapableConnection > & conn, std::shared_ptr< libp2p::protocol::Ping > ping)

Public Functions Documentation

function PingSession

PingSession(
    std::shared_ptr< boost::asio::io_context > io,
    std::shared_ptr< libp2p::Host > host
)

function Init

void Init()

function OnSessionPing

void OnSessionPing(
    libp2p::outcome::result< std::shared_ptr< libp2p::protocol::PingClientSession > > session
)

function OnNewConnection

void OnNewConnection(
    const std::weak_ptr< libp2p::connection::CapableConnection > & conn,
    std::shared_ptr< libp2p::protocol::Ping > ping
)

Updated on 2026-04-13 at 23:22:46 -0700