lokinet/llarp/link/endpoint.hpp
Thomas Winget ab86318404 Partial implementation of libquic as wire protocol
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
2023-08-28 11:06:10 -04:00

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