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.
30 lines
536 B
C++
30 lines
536 B
C++
6 years ago
|
#ifndef LLARP_ROUTING_MESSAGE_HPP
|
||
|
#define LLARP_ROUTING_MESSAGE_HPP
|
||
|
|
||
|
#include <llarp/buffer.h>
|
||
|
#include <llarp/router.h>
|
||
|
#include <llarp/path_types.hpp>
|
||
|
|
||
|
namespace llarp
|
||
|
{
|
||
|
namespace routing
|
||
|
{
|
||
|
struct IMessage
|
||
|
{
|
||
|
llarp::PathID_t from;
|
||
|
|
||
|
virtual ~IMessage(){};
|
||
|
|
||
|
virtual bool
|
||
|
BEncode(llarp_buffer_t* buf) const = 0;
|
||
|
|
||
|
virtual bool
|
||
|
BDecode(llarp_buffer_t* buf) = 0;
|
||
|
|
||
|
virtual bool
|
||
|
HandleMessage(llarp_router* r) const = 0;
|
||
|
};
|
||
|
} // namespace routing
|
||
|
} // namespace llarp
|
||
|
|
||
|
#endif
|