mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-17 15:25:35 +00:00
fa4471f566
- RemoteRC supplants most of the functionality throughout the code of RouterContact - Next step will be to sort out CI issues, then see if we can get rid of either LocalRC (and therefore RouterContact entirely)
31 lines
697 B
C++
31 lines
697 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(
|
|
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?
|
|
*/
|