mirror of https://github.com/oxen-io/lokinet
parent
d38646ed54
commit
19e3b9c642
@ -0,0 +1 @@
|
||||
insert lokinet api overview here
|
@ -1,16 +0,0 @@
|
||||
#ifndef LLARP_MESSAGES_HIDDEN_SERIVCE_HPP
|
||||
#define LLARP_MESSAGES_HIDDEN_SERIVCE_HPP
|
||||
|
||||
#include <llarp/routing/message.hpp>
|
||||
|
||||
namespace llarp
|
||||
{
|
||||
namespace routing
|
||||
{
|
||||
struct HiddenServiceFrame : public IMessage
|
||||
{
|
||||
};
|
||||
} // namespace routing
|
||||
} // namespace llarp
|
||||
|
||||
#endif
|
@ -1,28 +0,0 @@
|
||||
#ifndef LLARP_SERVICE_FRAME_HPP
|
||||
#define LLARP_SERVICE_FRAME_HPP
|
||||
#include <llarp/bencode.hpp>
|
||||
#include <llarp/crypto.hpp>
|
||||
#include <llarp/encrypted.hpp>
|
||||
|
||||
namespace llarp
|
||||
{
|
||||
namespace service
|
||||
{
|
||||
struct DataFrame : public llarp::IBEncodeMessage
|
||||
{
|
||||
llarp::Encrypted D;
|
||||
llarp::PubKey H;
|
||||
llarp::KeyExchangeNonce N;
|
||||
uint64_t S = 0;
|
||||
llarp::Signature Z;
|
||||
|
||||
bool
|
||||
BEncode(llarp_buffer_t* buf) const;
|
||||
|
||||
bool
|
||||
DecodeKey(llarp_buffer_t key, llarp_buffer_t* val);
|
||||
};
|
||||
} // namespace service
|
||||
} // namespace llarp
|
||||
|
||||
#endif
|
@ -0,0 +1,60 @@
|
||||
#ifndef LOKINET_LOKINET_HPP
|
||||
#define LOKINET_LOKINET_HPP
|
||||
#include <cstdint>
|
||||
#include <llarp/bencode.hpp>
|
||||
#include <llarp/router_id.hpp>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace lokinet
|
||||
{
|
||||
struct API_PImpl;
|
||||
struct RPCMessage : public llarp::IBEncodeMessage
|
||||
{
|
||||
};
|
||||
|
||||
/// a persisting anonymized session to a serive node
|
||||
struct Handle
|
||||
{
|
||||
llarp::RouterID remote;
|
||||
|
||||
bool
|
||||
Send(const RPCMessage* msg);
|
||||
|
||||
RPCMessage*
|
||||
Recv();
|
||||
|
||||
typedef std::shared_ptr< Handle > Ptr;
|
||||
|
||||
private:
|
||||
API_PImpl* m_Impl;
|
||||
};
|
||||
|
||||
struct Client
|
||||
{
|
||||
void
|
||||
Run();
|
||||
};
|
||||
|
||||
struct IMessageHandler
|
||||
{
|
||||
virtual RPCMessage*
|
||||
HandleMessage(const RPCMessage* inmsg) = 0;
|
||||
};
|
||||
|
||||
struct Server_PImpl;
|
||||
struct Server
|
||||
{
|
||||
Server(const uint8_t* secretkey, IMessageHandler* h);
|
||||
~Server();
|
||||
|
||||
void
|
||||
Run();
|
||||
|
||||
private:
|
||||
Server_PImpl* m_Impl;
|
||||
};
|
||||
|
||||
} // namespace lokinet
|
||||
|
||||
#endif
|
@ -1,8 +0,0 @@
|
||||
#include <llarp/service/frame.hpp>
|
||||
|
||||
namespace llarp
|
||||
{
|
||||
namespace service
|
||||
{
|
||||
}
|
||||
} // namespace llarp
|
Loading…
Reference in New Issue