llarp::service::SendContext

Inherited by llarp::service::OutboundContext

Public Types

Name
using std::shared_ptr< routing::PathTransferMessage > Msg_ptr
using std::pair< Msg_ptr, path::Path_ptr > SendEvent_t

Public Functions

Name
SendContext(ServiceInfo ident, const Introduction & intro, path::PathSet * send, Endpoint * ep)
void AsyncEncryptAndSendTo(const llarp_buffer_t & payload, ProtocolType t)
bool Send(std::shared_ptr< ProtocolFrame > f, path::Path_ptr path)
queue send a fully encrypted hidden service frame via a path
void FlushUpstream()
flush upstream traffic when in router thread
virtual bool ShiftIntroduction(bool rebuild =true)
virtual void ShiftIntroRouter(const RouterID ) =0
virtual void UpdateIntroSet() =0
virtual void MarkCurrentIntroBad(llarp_time_t now) =0
void AsyncSendAuth(std::function< void(AuthResult)> replyHandler)

Public Attributes

Name
SharedSecret sharedKey
ServiceInfo remoteIdent
Introduction remoteIntro
ConvoTag currentConvoTag
path::PathSet *const m_PathSet
IDataHandler *const m_DataHandler
Endpoint *const m_Endpoint
uint64_t sequenceNo
llarp_time_t lastGoodSend
const llarp_time_t createdAt
llarp_time_t sendTimeout
llarp_time_t connectTimeout
llarp_time_t shiftTimeout
llarp_time_t estimatedRTT
bool markedBad
thread::Queue< SendEvent_t > m_SendQueue
std::function< void(AuthResult)> authResultListener

Public Types Documentation

using Msg_ptr

using llarp::service::SendContext::Msg_ptr =  std::shared_ptr<routing::PathTransferMessage>;

using SendEvent_t

using llarp::service::SendContext::SendEvent_t =  std::pair<Msg_ptr, path::Path_ptr>;

Public Functions Documentation

function SendContext

SendContext(
    ServiceInfo ident,
    const Introduction & intro,
    path::PathSet * send,
    Endpoint * ep
)

function AsyncEncryptAndSendTo

void AsyncEncryptAndSendTo(
    const llarp_buffer_t & payload,
    ProtocolType t
)

function Send

bool Send(
    std::shared_ptr< ProtocolFrame > f,
    path::Path_ptr path
)

queue send a fully encrypted hidden service frame via a path

function FlushUpstream

void FlushUpstream()

flush upstream traffic when in router thread

function ShiftIntroduction

inline virtual bool ShiftIntroduction(
    bool rebuild =true
)

Reimplemented by: llarp::service::OutboundContext::ShiftIntroduction

function ShiftIntroRouter

virtual void ShiftIntroRouter(
    const RouterID 
) =0

Reimplemented by: llarp::service::OutboundContext::ShiftIntroRouter

function UpdateIntroSet

virtual void UpdateIntroSet() =0

Reimplemented by: llarp::service::OutboundContext::UpdateIntroSet

function MarkCurrentIntroBad

virtual void MarkCurrentIntroBad(
    llarp_time_t now
) =0

Reimplemented by: llarp::service::OutboundContext::MarkCurrentIntroBad

function AsyncSendAuth

void AsyncSendAuth(
    std::function< void(AuthResult)> replyHandler
)

Public Attributes Documentation

variable sharedKey

SharedSecret sharedKey;

variable remoteIdent

ServiceInfo remoteIdent;

variable remoteIntro

Introduction remoteIntro;

variable currentConvoTag

ConvoTag currentConvoTag;

variable m_PathSet

path::PathSet *const m_PathSet;

variable m_DataHandler

IDataHandler *const m_DataHandler;

variable m_Endpoint

Endpoint *const m_Endpoint;

variable sequenceNo

uint64_t sequenceNo = 0;

variable lastGoodSend

llarp_time_t lastGoodSend = 0s;

variable createdAt

const llarp_time_t createdAt;

variable sendTimeout

llarp_time_t sendTimeout = path::build_timeout;

variable connectTimeout

llarp_time_t connectTimeout = path::build_timeout * 2;

variable shiftTimeout

llarp_time_t shiftTimeout = (path::build_timeout * 5) / 2;

variable estimatedRTT

llarp_time_t estimatedRTT = 0s;

variable markedBad

bool markedBad = false;

variable m_SendQueue

thread::Queue< SendEvent_t > m_SendQueue;

variable authResultListener

std::function< void(AuthResult)> authResultListener;

Updated on 2026-01-10 at 22:49:45 +0000