lokinet/llarp/link/connection.hpp
dr7ana fa4471f566 {Remote,Local}RC's
- 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)
2023-11-02 05:30:49 -07:00

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?
*/