mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
process and save new RouterInfo
This commit is contained in:
parent
63e3a21291
commit
093e566da6
6 changed files with 122 additions and 41 deletions
7
NetDb.h
7
NetDb.h
|
@ -5,6 +5,8 @@
|
|||
#include <map>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include "Queue.h"
|
||||
#include "I2NPProtocol.h"
|
||||
#include "RouterInfo.h"
|
||||
#include "LeaseSet.h"
|
||||
|
||||
|
@ -31,10 +33,13 @@ namespace data
|
|||
|
||||
const RouterInfo * GetRandomNTCPRouter (bool floodfillOnly = false) const;
|
||||
const RouterInfo * GetRandomRouter () const;
|
||||
|
||||
void PostDatabaseStoreMsg (I2NPMessage * msg);
|
||||
|
||||
private:
|
||||
|
||||
void Load (const char * directory);
|
||||
void SaveUpdated (const char * directory);
|
||||
void Run (); // exploratory thread
|
||||
void Explore ();
|
||||
|
||||
|
@ -46,6 +51,8 @@ namespace data
|
|||
bool m_IsRunning;
|
||||
std::thread * m_Thread;
|
||||
uint8_t m_Exploratory[32];
|
||||
const RouterInfo * m_LastFloodfill;
|
||||
i2p::util::Queue<I2NPMessage> m_Queue; // of I2NPDatabaseStoreMsg
|
||||
};
|
||||
|
||||
extern NetDb netdb;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue