llarp::dtls::Session

Inherits from llarp::ILinkSession, std::enable_shared_from_this< Session >

Public Functions

Name
Session(LinkLayer * parent, const RouterContact & rc, const AddressInfo & ai)
Session(LinkLayer * parent, const SockAddr & from)
~Session() override
virtual void Pump() override
called during pumping
virtual void Tick(llarp_time_t ) override
called every timer tick
virtual bool SendMessageBuffer(Message_t , CompletionHandler handler, uint16_t priority) override
send a message buffer to the remote endpoint
virtual void Start() override
start the connection
virtual void Close() override
virtual bool Recv_LL(Packet_t ) override
recv packet on low layer not used by utp
virtual bool SendKeepAlive() override
send a keepalive to the remote endpoint
virtual bool IsEstablished() const override
return true if we are established
virtual bool TimedOut(llarp_time_t now) const override
return true if this session has timed out
virtual PubKey GetPubKey() const override
get remote public identity key
virtual bool IsInbound() const override
is an inbound session or not
virtual const SockAddr & GetRemoteEndpoint() const override
get remote address
virtual RouterContact GetRemoteRC() const override
virtual size_t SendQueueBacklog() const override
send queue current blacklog
virtual ILinkLayer * GetLinkLayer() const override
get parent link layer
virtual bool RenegotiateSession() override
renegotiate session when we have a new RC locally
virtual bool ShouldPing() const override
return true if we should send an explicit keepalive message
virtual SessionStats GetSessionStats() const override
return the current stats for this session
virtual void HandlePlaintext() override

Additional inherited members

Public Types inherited from llarp::ILinkSession

Name
enum class DeliveryStatus { eDeliverySuccess, eDeliveryDropped}
delivery status of a message
using std::function< void(DeliveryStatus)> CompletionHandler
message delivery result hook function
using std::vector< byte_t > Packet_t
using std::vector< byte_t > Message_t

Public Functions inherited from llarp::ILinkSession

Name
virtual ~ILinkSession() =default
virtual void OnLinkEstablished(ILinkLayer * )
hook for utp for when we have established a connection
bool IsRelay() const
is this session a session to a relay?

Public Attributes inherited from llarp::ILinkSession

Name
std::function< bool(const LinkIntroMessage *msg)> GotLIM
handle a valid LIM

Public Functions Documentation

function Session

Session(
    LinkLayer * parent,
    const RouterContact & rc,
    const AddressInfo & ai
)

function Session

Session(
    LinkLayer * parent,
    const SockAddr & from
)

function ~Session

~Session() override

function Pump

virtual void Pump() override

called during pumping

Reimplements: llarp::ILinkSession::Pump

function Tick

virtual void Tick(
    llarp_time_t 
) override

called every timer tick

Reimplements: llarp::ILinkSession::Tick

function SendMessageBuffer

virtual bool SendMessageBuffer(
    Message_t ,
    CompletionHandler handler,
    uint16_t priority
) override

send a message buffer to the remote endpoint

Reimplements: llarp::ILinkSession::SendMessageBuffer

function Start

virtual void Start() override

start the connection

Reimplements: llarp::ILinkSession::Start

function Close

virtual void Close() override

Reimplements: llarp::ILinkSession::Close

function Recv_LL

virtual bool Recv_LL(
    Packet_t 
) override

recv packet on low layer not used by utp

Reimplements: llarp::ILinkSession::Recv_LL

function SendKeepAlive

virtual bool SendKeepAlive() override

send a keepalive to the remote endpoint

Reimplements: llarp::ILinkSession::SendKeepAlive

function IsEstablished

virtual bool IsEstablished() const override

return true if we are established

Reimplements: llarp::ILinkSession::IsEstablished

function TimedOut

virtual bool TimedOut(
    llarp_time_t now
) const override

return true if this session has timed out

Reimplements: llarp::ILinkSession::TimedOut

function GetPubKey

inline virtual PubKey GetPubKey() const override

get remote public identity key

Reimplements: llarp::ILinkSession::GetPubKey

function IsInbound

inline virtual bool IsInbound() const override

is an inbound session or not

Reimplements: llarp::ILinkSession::IsInbound

function GetRemoteEndpoint

inline virtual const SockAddr & GetRemoteEndpoint() const override

get remote address

Reimplements: llarp::ILinkSession::GetRemoteEndpoint

function GetRemoteRC

inline virtual RouterContact GetRemoteRC() const override

Reimplements: llarp::ILinkSession::GetRemoteRC

function SendQueueBacklog

inline virtual size_t SendQueueBacklog() const override

send queue current blacklog

Reimplements: llarp::ILinkSession::SendQueueBacklog

function GetLinkLayer

virtual ILinkLayer * GetLinkLayer() const override

get parent link layer

Reimplements: llarp::ILinkSession::GetLinkLayer

function RenegotiateSession

virtual bool RenegotiateSession() override

renegotiate session when we have a new RC locally

Reimplements: llarp::ILinkSession::RenegotiateSession

function ShouldPing

virtual bool ShouldPing() const override

return true if we should send an explicit keepalive message

Reimplements: llarp::ILinkSession::ShouldPing

function GetSessionStats

virtual SessionStats GetSessionStats() const override

return the current stats for this session

Reimplements: llarp::ILinkSession::GetSessionStats

function HandlePlaintext

virtual void HandlePlaintext() override

Reimplements: llarp::ILinkSession::HandlePlaintext


Updated on 2026-08-23 at 15:46:33 +0000