---
title: llarp::rpc

---

# llarp::rpc



## Namespaces

| Name           |
| -------------- |
| **[llarp::rpc::endpoint](Namespaces/namespacellarp_1_1rpc_1_1endpoint.md)**  |

## Classes

|                | Name           |
| -------------- | -------------- |
| struct | **[llarp::rpc::EndpointAuthRPC](Classes/structllarp_1_1rpc_1_1EndpointAuthRPC.md)**  |
| struct | **[llarp::rpc::LokidRpcClient](Classes/structllarp_1_1rpc_1_1LokidRpcClient.md)** <br>The [LokidRpcClient]() uses loki-mq to talk to make API requests to lokid.  |
| struct | **[llarp::rpc::RPCRequest](Classes/structllarp_1_1rpc_1_1RPCRequest.md)**  |
| struct | **[llarp::rpc::NoArgs](Classes/structllarp_1_1rpc_1_1NoArgs.md)**  |
| struct | **[llarp::rpc::Deferred](Classes/structllarp_1_1rpc_1_1Deferred.md)**  |
| struct | **[llarp::rpc::Immediate](Classes/structllarp_1_1rpc_1_1Immediate.md)**  |
| struct | **[llarp::rpc::Halt](Classes/structllarp_1_1rpc_1_1Halt.md)**  |
| struct | **[llarp::rpc::Version](Classes/structllarp_1_1rpc_1_1Version.md)**  |
| struct | **[llarp::rpc::Status](Classes/structllarp_1_1rpc_1_1Status.md)**  |
| struct | **[llarp::rpc::GetStatus](Classes/structllarp_1_1rpc_1_1GetStatus.md)**  |
| struct | **[llarp::rpc::QuicConnect](Classes/structllarp_1_1rpc_1_1QuicConnect.md)**  |
| struct | **[llarp::rpc::QuicListener](Classes/structllarp_1_1rpc_1_1QuicListener.md)**  |
| struct | **[llarp::rpc::LookupSnode](Classes/structllarp_1_1rpc_1_1LookupSnode.md)**  |
| struct | **[llarp::rpc::Exit](Classes/structllarp_1_1rpc_1_1Exit.md)**  |
| struct | **[llarp::rpc::DNSQuery](Classes/structllarp_1_1rpc_1_1DNSQuery.md)**  |
| struct | **[llarp::rpc::Config](Classes/structllarp_1_1rpc_1_1Config.md)**  |
| struct | **[llarp::rpc::rpc_callback](Classes/structllarp_1_1rpc_1_1rpc__callback.md)**  |
| struct | **[llarp::rpc::rpc_error](Classes/structllarp_1_1rpc_1_1rpc__error.md)**  |
| class | **[llarp::rpc::RPCServer](Classes/classllarp_1_1rpc_1_1RPCServer.md)**  |
| class | **[llarp::rpc::EndpointHandler](Classes/classllarp_1_1rpc_1_1EndpointHandler.md)**  |

## Types

|                | Name           |
| -------------- | -------------- |
| typedef std::shared_ptr< oxenmq::OxenMQ > | **[LMQ_ptr](Namespaces/namespacellarp_1_1rpc.md#typedef-lmq-ptr)**  |
| using [tools::type_list](Classes/structtools_1_1type__list.md)< [Halt](Classes/structllarp_1_1rpc_1_1Halt.md), [Version](Classes/structllarp_1_1rpc_1_1Version.md), [Status](Classes/structllarp_1_1rpc_1_1Status.md), [GetStatus](Classes/structllarp_1_1rpc_1_1GetStatus.md), [QuicConnect](Classes/structllarp_1_1rpc_1_1QuicConnect.md), [QuicListener](Classes/structllarp_1_1rpc_1_1QuicListener.md), [LookupSnode](Classes/structllarp_1_1rpc_1_1LookupSnode.md), [Exit](Classes/structllarp_1_1rpc_1_1Exit.md), [DNSQuery](Classes/structllarp_1_1rpc_1_1DNSQuery.md), [Config](Classes/structllarp_1_1rpc_1_1Config.md) > | **[rpc_request_types](Namespaces/namespacellarp_1_1rpc.md#using-rpc-request-types)**  |
| using std::variant< std::monostate, nlohmann::json, oxenc::bt_dict_consumer > | **[rpc_input](Namespaces/namespacellarp_1_1rpc.md#using-rpc-input)**  |
| using oxenmq::Message::DeferredSend | **[DeferredSend](Namespaces/namespacellarp_1_1rpc.md#using-deferredsend)**  |

## Functions

|                | Name           |
| -------------- | -------------- |
| template <typename... Ignore\> <br>void | **[check_ascending_names](Namespaces/namespacellarp_1_1rpc.md#function-check-ascending-names)**(std::string_view name1, std::string_view name2, const Ignore & ...) |
| template <typename Input ,typename T ,typename... More\> <br>void | **[get_values](Namespaces/namespacellarp_1_1rpc.md#function-get-values)**(Input & in, std::string_view name, T && val, More &&... more) |
| template <typename RPC \> <br>auto | **[make_invoke](Namespaces/namespacellarp_1_1rpc.md#function-make-invoke)**() |
| void | **[parse_request](Namespaces/namespacellarp_1_1rpc.md#function-parse-request)**([NoArgs](Classes/structllarp_1_1rpc_1_1NoArgs.md) & , rpc_input ) |
| void | **[parse_request](Namespaces/namespacellarp_1_1rpc.md#function-parse-request)**([QuicConnect](Classes/structllarp_1_1rpc_1_1QuicConnect.md) & quicconnect, rpc_input input) |
| void | **[parse_request](Namespaces/namespacellarp_1_1rpc.md#function-parse-request)**([QuicListener](Classes/structllarp_1_1rpc_1_1QuicListener.md) & quiclistener, rpc_input input) |
| void | **[parse_request](Namespaces/namespacellarp_1_1rpc.md#function-parse-request)**([LookupSnode](Classes/structllarp_1_1rpc_1_1LookupSnode.md) & lookupsnode, rpc_input input) |
| void | **[parse_request](Namespaces/namespacellarp_1_1rpc.md#function-parse-request)**([Exit](Classes/structllarp_1_1rpc_1_1Exit.md) & exit, rpc_input input) |
| void | **[parse_request](Namespaces/namespacellarp_1_1rpc.md#function-parse-request)**([DNSQuery](Classes/structllarp_1_1rpc_1_1DNSQuery.md) & dnsquery, rpc_input input) |
| void | **[parse_request](Namespaces/namespacellarp_1_1rpc.md#function-parse-request)**([Config](Classes/structllarp_1_1rpc_1_1Config.md) & config, rpc_input input) |
| template <typename Result_t \> <br>std::string | **[CreateJSONResponse](Namespaces/namespacellarp_1_1rpc.md#function-createjsonresponse)**(Result_t result) |
| std::string | **[CreateJSONError](Namespaces/namespacellarp_1_1rpc.md#function-createjsonerror)**(std::string_view msg) |

## Attributes

|                | Name           |
| -------------- | -------------- |
| const std::unordered_map< std::string, std::shared_ptr< const [rpc_callback](Classes/structllarp_1_1rpc_1_1rpc__callback.md) > > | **[rpc_request_map](Namespaces/namespacellarp_1_1rpc.md#variable-rpc-request-map)**  |

## Types Documentation

### typedef LMQ_ptr

```cpp
typedef std::shared_ptr< oxenmq::OxenMQ > llarp::rpc::LMQ_ptr;
```


### using rpc_request_types

```cpp
using llarp::rpc::rpc_request_types = typedef tools::type_list< Halt, Version, Status, GetStatus, QuicConnect, QuicListener, LookupSnode, Exit, DNSQuery, Config>;
```


### using rpc_input

```cpp
using llarp::rpc::rpc_input = typedef std::variant<std::monostate, nlohmann::json, oxenc::bt_dict_consumer>;
```


### using DeferredSend

```cpp
using llarp::rpc::DeferredSend = typedef oxenmq::Message::DeferredSend;
```



## Functions Documentation

### function check_ascending_names

```cpp
template <typename... Ignore>
void check_ascending_names(
    std::string_view name1,
    std::string_view name2,
    const Ignore & ...
)
```


### function get_values

```cpp
template <typename Input ,
typename T ,
typename... More>
void get_values(
    Input & in,
    std::string_view name,
    T && val,
    More &&... more
)
```


### function make_invoke

```cpp
template <typename RPC >
auto make_invoke()
```


### function parse_request

```cpp
inline void parse_request(
    NoArgs & ,
    rpc_input 
)
```


### function parse_request

```cpp
void parse_request(
    QuicConnect & quicconnect,
    rpc_input input
)
```


### function parse_request

```cpp
void parse_request(
    QuicListener & quiclistener,
    rpc_input input
)
```


### function parse_request

```cpp
void parse_request(
    LookupSnode & lookupsnode,
    rpc_input input
)
```


### function parse_request

```cpp
void parse_request(
    Exit & exit,
    rpc_input input
)
```


### function parse_request

```cpp
void parse_request(
    DNSQuery & dnsquery,
    rpc_input input
)
```


### function parse_request

```cpp
void parse_request(
    Config & config,
    rpc_input input
)
```


### function CreateJSONResponse

```cpp
template <typename Result_t >
std::string CreateJSONResponse(
    Result_t result
)
```


### function CreateJSONError

```cpp
std::string CreateJSONError(
    std::string_view msg
)
```



## Attributes Documentation

### variable rpc_request_map

```cpp
const std::unordered_map< std::string, std::shared_ptr< const rpc_callback > > rpc_request_map;
```





-------------------------------

Updated on 2023-01-18 at 23:51:38 +0000