---
title: llarp::service::ProtocolMessage
summary: inner message 

---

# llarp::service::ProtocolMessage



inner message 


`#include <protocol.hpp>`

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[ProtocolMessage](Classes/structllarp_1_1service_1_1ProtocolMessage.md#function-protocolmessage)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & tag) |
| | **[ProtocolMessage](Classes/structllarp_1_1service_1_1ProtocolMessage.md#function-protocolmessage)**() |
| | **[~ProtocolMessage](Classes/structllarp_1_1service_1_1ProtocolMessage.md#function-~protocolmessage)**() |
| std::vector< char > | **[EncodeAuthInfo](Classes/structllarp_1_1service_1_1ProtocolMessage.md#function-encodeauthinfo)**() const<br>encode metainfo for lmq endpoint auth  |
| bool | **[DecodeKey](Classes/structllarp_1_1service_1_1ProtocolMessage.md#function-decodekey)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & key, [llarp_buffer_t](Classes/structllarp__buffer__t.md) * val) |
| bool | **[BEncode](Classes/structllarp_1_1service_1_1ProtocolMessage.md#function-bencode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) const |
| void | **[PutBuffer](Classes/structllarp_1_1service_1_1ProtocolMessage.md#function-putbuffer)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & payload) |
| bool | **[operator>](Classes/structllarp_1_1service_1_1ProtocolMessage.md#function-operator>)**(const [ProtocolMessage](Classes/structllarp_1_1service_1_1ProtocolMessage.md) & other) const |
| void | **[ProcessAsync](Classes/structllarp_1_1service_1_1ProtocolMessage.md#function-processasync)**(path::Path_ptr p, [PathID_t](Classes/structllarp_1_1PathID__t.md) from, std::shared_ptr< [ProtocolMessage](Classes/structllarp_1_1service_1_1ProtocolMessage.md) > self) |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| ProtocolType | **[proto](Classes/structllarp_1_1service_1_1ProtocolMessage.md#variable-proto)**  |
| llarp_time_t | **[queued](Classes/structllarp_1_1service_1_1ProtocolMessage.md#variable-queued)**  |
| std::vector< byte_t > | **[payload](Classes/structllarp_1_1service_1_1ProtocolMessage.md#variable-payload)**  |
| [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) | **[introReply](Classes/structllarp_1_1service_1_1ProtocolMessage.md#variable-introreply)**  |
| [ServiceInfo](Classes/structllarp_1_1service_1_1ServiceInfo.md) | **[sender](Classes/structllarp_1_1service_1_1ProtocolMessage.md#variable-sender)**  |
| [Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md) * | **[handler](Classes/structllarp_1_1service_1_1ProtocolMessage.md#variable-handler)**  |
| [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) | **[tag](Classes/structllarp_1_1service_1_1ProtocolMessage.md#variable-tag)**  |
| uint64_t | **[seqno](Classes/structllarp_1_1service_1_1ProtocolMessage.md#variable-seqno)**  |
| uint64_t | **[version](Classes/structllarp_1_1service_1_1ProtocolMessage.md#variable-version)**  |

## Public Functions Documentation

### function ProtocolMessage

```cpp
ProtocolMessage(
    const ConvoTag & tag
)
```


### function ProtocolMessage

```cpp
ProtocolMessage()
```


### function ~ProtocolMessage

```cpp
~ProtocolMessage()
```


### function EncodeAuthInfo

```cpp
std::vector< char > EncodeAuthInfo() const
```

encode metainfo for lmq endpoint auth 

### function DecodeKey

```cpp
bool DecodeKey(
    const llarp_buffer_t & key,
    llarp_buffer_t * val
)
```


### function BEncode

```cpp
bool BEncode(
    llarp_buffer_t * buf
) const
```


### function PutBuffer

```cpp
void PutBuffer(
    const llarp_buffer_t & payload
)
```


### function operator>

```cpp
inline bool operator>(
    const ProtocolMessage & other
) const
```


### function ProcessAsync

```cpp
static void ProcessAsync(
    path::Path_ptr p,
    PathID_t from,
    std::shared_ptr< ProtocolMessage > self
)
```


## Public Attributes Documentation

### variable proto

```cpp
ProtocolType proto = ProtocolType::TrafficV4;
```


### variable queued

```cpp
llarp_time_t queued = 0s;
```


### variable payload

```cpp
std::vector< byte_t > payload;
```


### variable introReply

```cpp
Introduction introReply;
```


### variable sender

```cpp
ServiceInfo sender;
```


### variable handler

```cpp
Endpoint * handler = nullptr;
```


### variable tag

```cpp
ConvoTag tag;
```


### variable seqno

```cpp
uint64_t seqno = 0;
```


### variable version

```cpp
uint64_t version = llarp::constants::proto_version;
```


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

Updated on 2023-01-06 at 19:35:06 +0000