2020-05-21 14:09:45 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string_view>
|
|
|
|
#include <lokimq/lokimq.h>
|
2020-06-11 18:26:02 +00:00
|
|
|
#include <lokimq/address.h>
|
2020-05-21 14:09:45 +00:00
|
|
|
|
|
|
|
namespace llarp
|
|
|
|
{
|
|
|
|
struct AbstractRouter;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace llarp::rpc
|
|
|
|
{
|
|
|
|
using LMQ_ptr = std::shared_ptr<lokimq::LokiMQ>;
|
|
|
|
|
|
|
|
struct RpcServer
|
|
|
|
{
|
|
|
|
explicit RpcServer(LMQ_ptr, AbstractRouter*);
|
|
|
|
~RpcServer() = default;
|
|
|
|
void
|
2020-06-11 18:26:02 +00:00
|
|
|
AsyncServeRPC(lokimq::address addr);
|
2020-05-21 14:09:45 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
LMQ_ptr m_LMQ;
|
|
|
|
AbstractRouter* const m_Router;
|
|
|
|
};
|
|
|
|
} // namespace llarp::rpc
|