---
title: llarp::service::IDataHandler

---

# llarp::service::IDataHandler





Inherited by [llarp::service::Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| virtual bool | **[HandleDataMessage](Classes/structllarp_1_1service_1_1IDataHandler.md#function-handledatamessage)**(path::Path_ptr path, const [PathID_t](Classes/structllarp_1_1PathID__t.md) from, std::shared_ptr< [ProtocolMessage](Classes/structllarp_1_1service_1_1ProtocolMessage.md) > msg) =0 |
| virtual bool | **[GetCachedSessionKeyFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-getcachedsessionkeyfor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, [SharedSecret](Classes/structllarp_1_1AlignedBuffer.md) & secret) const =0 |
| virtual void | **[PutCachedSessionKeyFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-putcachedsessionkeyfor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, const [SharedSecret](Classes/structllarp_1_1AlignedBuffer.md) & secret) =0 |
| virtual void | **[ConvoTagTX](Classes/structllarp_1_1service_1_1IDataHandler.md#function-convotagtx)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & tag) =0<br>called when we send data to remote on a convotag  |
| virtual void | **[ConvoTagRX](Classes/structllarp_1_1service_1_1IDataHandler.md#function-convotagrx)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & tag) =0<br>called when we got data from remote on a convotag  |
| virtual void | **[RemoveConvoTag](Classes/structllarp_1_1service_1_1IDataHandler.md#function-removeconvotag)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote) =0 |
| virtual bool | **[HasConvoTag](Classes/structllarp_1_1service_1_1IDataHandler.md#function-hasconvotag)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote) const =0 |
| virtual void | **[PutSenderFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-putsenderfor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, const [ServiceInfo](Classes/structllarp_1_1service_1_1ServiceInfo.md) & si, bool inbound) =0 |
| virtual bool | **[GetSenderFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-getsenderfor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, [ServiceInfo](Classes/structllarp_1_1service_1_1ServiceInfo.md) & si) const =0 |
| virtual void | **[PutIntroFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-putintrofor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, const [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) =0 |
| virtual bool | **[GetIntroFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-getintrofor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) const =0 |
| virtual void | **[PutReplyIntroFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-putreplyintrofor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, const [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) =0 |
| virtual bool | **[GetReplyIntroFor](Classes/structllarp_1_1service_1_1IDataHandler.md#function-getreplyintrofor)**(const [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) & remote, [Introduction](Classes/structllarp_1_1service_1_1Introduction.md) & intro) const =0 |
| virtual bool | **[GetConvoTagsForService](Classes/structllarp_1_1service_1_1IDataHandler.md#function-getconvotagsforservice)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & si, std::set< [ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) > & tag) const =0 |
| virtual bool | **[HasInboundConvo](Classes/structllarp_1_1service_1_1IDataHandler.md#function-hasinboundconvo)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & addr) const =0 |
| virtual bool | **[HasOutboundConvo](Classes/structllarp_1_1service_1_1IDataHandler.md#function-hasoutboundconvo)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & addr) const =0 |
| virtual bool | **[WantsOutboundSession](Classes/structllarp_1_1service_1_1IDataHandler.md#function-wantsoutboundsession)**(const [Address](Classes/structllarp_1_1service_1_1Address.md) & addr) const =0<br>do we want a session outbound to addr  |
| virtual void | **[QueueRecvData](Classes/structllarp_1_1service_1_1IDataHandler.md#function-queuerecvdata)**([RecvDataEvent](Classes/structllarp_1_1service_1_1RecvDataEvent.md) ev) =0 |

## Public Functions Documentation

### function HandleDataMessage

```cpp
virtual bool HandleDataMessage(
    path::Path_ptr path,
    const PathID_t from,
    std::shared_ptr< ProtocolMessage > msg
) =0
```


**Reimplemented by**: [llarp::service::Endpoint::HandleDataMessage](Classes/structllarp_1_1service_1_1Endpoint.md#function-handledatamessage)


### function GetCachedSessionKeyFor

```cpp
virtual bool GetCachedSessionKeyFor(
    const ConvoTag & remote,
    SharedSecret & secret
) const =0
```


**Reimplemented by**: [llarp::service::Endpoint::GetCachedSessionKeyFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-getcachedsessionkeyfor)


### function PutCachedSessionKeyFor

```cpp
virtual void PutCachedSessionKeyFor(
    const ConvoTag & remote,
    const SharedSecret & secret
) =0
```


**Reimplemented by**: [llarp::service::Endpoint::PutCachedSessionKeyFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-putcachedsessionkeyfor)


### function ConvoTagTX

```cpp
virtual void ConvoTagTX(
    const ConvoTag & tag
) =0
```

called when we send data to remote on a convotag 

**Reimplemented by**: [llarp::service::Endpoint::ConvoTagTX](Classes/structllarp_1_1service_1_1Endpoint.md#function-convotagtx)


### function ConvoTagRX

```cpp
virtual void ConvoTagRX(
    const ConvoTag & tag
) =0
```

called when we got data from remote on a convotag 

**Reimplemented by**: [llarp::service::Endpoint::ConvoTagRX](Classes/structllarp_1_1service_1_1Endpoint.md#function-convotagrx)


### function RemoveConvoTag

```cpp
virtual void RemoveConvoTag(
    const ConvoTag & remote
) =0
```


**Reimplemented by**: [llarp::service::Endpoint::RemoveConvoTag](Classes/structllarp_1_1service_1_1Endpoint.md#function-removeconvotag)


### function HasConvoTag

```cpp
virtual bool HasConvoTag(
    const ConvoTag & remote
) const =0
```


**Reimplemented by**: [llarp::service::Endpoint::HasConvoTag](Classes/structllarp_1_1service_1_1Endpoint.md#function-hasconvotag)


### function PutSenderFor

```cpp
virtual void PutSenderFor(
    const ConvoTag & remote,
    const ServiceInfo & si,
    bool inbound
) =0
```


**Reimplemented by**: [llarp::service::Endpoint::PutSenderFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-putsenderfor)


### function GetSenderFor

```cpp
virtual bool GetSenderFor(
    const ConvoTag & remote,
    ServiceInfo & si
) const =0
```


**Reimplemented by**: [llarp::service::Endpoint::GetSenderFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-getsenderfor)


### function PutIntroFor

```cpp
virtual void PutIntroFor(
    const ConvoTag & remote,
    const Introduction & intro
) =0
```


**Reimplemented by**: [llarp::service::Endpoint::PutIntroFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-putintrofor)


### function GetIntroFor

```cpp
virtual bool GetIntroFor(
    const ConvoTag & remote,
    Introduction & intro
) const =0
```


**Reimplemented by**: [llarp::service::Endpoint::GetIntroFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-getintrofor)


### function PutReplyIntroFor

```cpp
virtual void PutReplyIntroFor(
    const ConvoTag & remote,
    const Introduction & intro
) =0
```


**Reimplemented by**: [llarp::service::Endpoint::PutReplyIntroFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-putreplyintrofor)


### function GetReplyIntroFor

```cpp
virtual bool GetReplyIntroFor(
    const ConvoTag & remote,
    Introduction & intro
) const =0
```


**Reimplemented by**: [llarp::service::Endpoint::GetReplyIntroFor](Classes/structllarp_1_1service_1_1Endpoint.md#function-getreplyintrofor)


### function GetConvoTagsForService

```cpp
virtual bool GetConvoTagsForService(
    const Address & si,
    std::set< ConvoTag > & tag
) const =0
```


**Reimplemented by**: [llarp::service::Endpoint::GetConvoTagsForService](Classes/structllarp_1_1service_1_1Endpoint.md#function-getconvotagsforservice)


### function HasInboundConvo

```cpp
virtual bool HasInboundConvo(
    const Address & addr
) const =0
```


**Reimplemented by**: [llarp::service::Endpoint::HasInboundConvo](Classes/structllarp_1_1service_1_1Endpoint.md#function-hasinboundconvo)


### function HasOutboundConvo

```cpp
virtual bool HasOutboundConvo(
    const Address & addr
) const =0
```


**Reimplemented by**: [llarp::service::Endpoint::HasOutboundConvo](Classes/structllarp_1_1service_1_1Endpoint.md#function-hasoutboundconvo)


### function WantsOutboundSession

```cpp
virtual bool WantsOutboundSession(
    const Address & addr
) const =0
```

do we want a session outbound to addr 

**Reimplemented by**: [llarp::service::Endpoint::WantsOutboundSession](Classes/structllarp_1_1service_1_1Endpoint.md#function-wantsoutboundsession)


### function QueueRecvData

```cpp
virtual void QueueRecvData(
    RecvDataEvent ev
) =0
```


**Reimplemented by**: [llarp::service::Endpoint::QueueRecvData](Classes/structllarp_1_1service_1_1Endpoint.md#function-queuerecvdata)


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

Updated on 2023-01-24 at 18:23:43 +0000