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.
26 lines
463 B
C++
26 lines
463 B
C++
#ifndef LLARP_API_PARSER_HPP
|
|
#define LLARP_API_PARSER_HPP
|
|
#include <llarp/bencode.h>
|
|
#include <llarp/api/messages.hpp>
|
|
|
|
namespace llarp
|
|
{
|
|
namespace api
|
|
{
|
|
struct MessageParser
|
|
{
|
|
MessageParser();
|
|
|
|
IMessage *
|
|
ParseMessage(llarp_buffer_t buf);
|
|
|
|
private:
|
|
static bool
|
|
OnKey(dict_reader *r, llarp_buffer_t *key);
|
|
IMessage *msg = nullptr;
|
|
dict_reader r;
|
|
};
|
|
} // namespace api
|
|
} // namespace llarp
|
|
|
|
#endif |