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:
parent
3c46b07bfe
commit
9b42a21ca2
30
llarp/link/connection.hpp
Normal file
30
llarp/link/connection.hpp
Normal 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
|
Loading…
Reference in a new issue