mirror of https://github.com/oxen-io/lokinet
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
735 B
C++
34 lines
735 B
C++
#include <llarp/msg_handler.h>
|
|
#include "router.hpp"
|
|
|
|
namespace llarp
|
|
{
|
|
static struct llarp_frame_handler*
|
|
find_frame_handler(struct llarp_router* r, const char ch)
|
|
{
|
|
auto itr = r->frame_handlers.find(ch);
|
|
if(itr != r->frame_handlers.end())
|
|
{
|
|
auto handler = &itr->second;
|
|
handler->paths = r->paths;
|
|
handler->parent = &r->muxer;
|
|
}
|
|
return nullptr;
|
|
}
|
|
|
|
static struct llarp_msg_handler*
|
|
find_msg_handler(struct llarp_router* r, const char ch)
|
|
{
|
|
return nullptr;
|
|
}
|
|
} // namespace llarp
|
|
|
|
extern "C" {
|
|
void
|
|
llarp_msg_muxer_init(struct llarp_msg_muxer* muxer)
|
|
{
|
|
muxer->link_handler_for = &llarp::find_frame_handler;
|
|
muxer->routing_handler_for = &llarp::find_msg_handler;
|
|
}
|
|
}
|