llarp/service/session.hpp
Namespaces
| Name |
|---|
| llarp [crypto.hpp] |
| llarp::service |
Classes
| Name | |
|---|---|
| struct | llarp::service::Session |
Source code
#pragma once
#include <llarp/crypto/types.hpp>
#include <llarp/path/path.hpp>
#include "info.hpp"
#include "intro.hpp"
#include <llarp/util/types.hpp>
namespace llarp
{
namespace service
{
static constexpr auto SessionLifetime = path::default_lifetime * 2;
struct Session
{
Introduction replyIntro;
SharedSecret sharedKey;
ServiceInfo remote;
Introduction intro;
uint64_t seqno = 0;
uint64_t messagesSend = 0;
uint64_t messagesRecv = 0;
bool inbound = false;
bool forever = false;
Duration_t lastSend{};
Duration_t lastRecv{};
void
RX();
void
TX();
bool
IsExpired(llarp_time_t now, llarp_time_t lifetime = SessionLifetime) const;
Address
Addr() const;
};
} // namespace service
} // namespace llarp
Updated on 2026-01-10 at 22:49:45 +0000