mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-11 07:10:36 +00:00
ab86318404
TODO: - set up all the callbacks for libquic - define control message requests, responses, commands - plug new control messages into lokinet (path creation, network state, etc) - plug connection state changes (established, failed, closed, etc.) into lokinet - lots of cleanup and miscellanea
26 lines
626 B
C++
26 lines
626 B
C++
#pragma once
|
|
|
|
#include "connection.hpp"
|
|
|
|
#include <llarp/router/abstractrouter.hpp>
|
|
#include <llarp/router_id.hpp>
|
|
|
|
#include <external/oxen-libquic/include/quic.hpp>
|
|
|
|
namespace llarp::link
|
|
{
|
|
|
|
struct Endpoint
|
|
{
|
|
std::shared_ptr<oxen::quic::Endpoint> endpoint;
|
|
bool inbound {false};
|
|
|
|
// for outgoing packets, we route via RouterID; map RouterID->Connection
|
|
// for incoming packets, we get a ConnectionID; map ConnectionID->RouterID
|
|
std::unordered_map<RouterID, llarp::link::Connection> connections;
|
|
std::unordered_map<oxen::quic::ConnectionID, RouterID> connid_map;
|
|
|
|
};
|
|
|
|
} // namespace llarp::link
|