1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/llarp/link/connection.hpp
dr7ana 63644d3d84 Bootstrap seed
- nodes now send their RC to the bootstrap seed on making a request
- allows the bootstrap seed to distribute RCs
2023-12-11 07:32:52 -08:00

31 lines
703 B
C++

#pragma once
#include <llarp/router_contact.hpp>
#include <llarp/router_id.hpp>
#include <quic.hpp>
namespace llarp::link
{
struct Connection
{
std::shared_ptr<oxen::quic::connection_interface> conn;
std::shared_ptr<oxen::quic::BTRequestStream> control_stream;
RemoteRC remote_rc;
// one side of a connection will be responsible for some things, e.g. heartbeat
bool inbound{false};
bool remote_is_relay{true};
Connection(
const std::shared_ptr<oxen::quic::connection_interface>& c,
std::shared_ptr<oxen::quic::BTRequestStream>& s,
const RemoteRC& rc);
};
} // namespace llarp::link
/*
TODO:
- make control_stream a weak pointer?
*/