1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

initial quic wire proto Connection skeleton

This commit is contained in:
Thomas Winget 2023-07-31 08:42:03 -04:00
parent 3c46b07bfe
commit 9b42a21ca2

30
llarp/link/connection.hpp Normal file
View file

@ -0,0 +1,30 @@
#pragma once
#include <llarp/router_id.hpp>
#include <llarp/router_contact.hpp>
#include <oxen-libquic/include/quic.hpp>
namespace llarp::link
{
class Connection
{
std::shared_ptr<oxen::quic::connection_interface> conn;
RouterID remote_id;
RouterContact remote_rc;
AddressInfo remote_addr_info; // RC may have many, this is the one in use for this connection
bool inbound; // one side of a connection will be responsible for some things, e.g. heartbeat
bool remote_is_relay;
public:
const RouterContact& RemoteRC() { return remote_rc; }
const RouterID& RemoteID() { return remote_id; }
bool RemoteIsRelay() { return remote_is_relay; }
};
} // namespace llarp::link