mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-22 13:24:26 -04:00
added limiter in number of responses forwarded back by turtle search, which should avoid bursts of bandwidth for popular requests
This commit is contained in:
parent
558bb9f760
commit
6fe14136ae
7 changed files with 133 additions and 82 deletions
|
@ -52,13 +52,20 @@ struct TurtleFileInfo
|
|||
std::string name ;
|
||||
uint64_t size ;
|
||||
};
|
||||
|
||||
struct TurtleRequestDisplayInfo
|
||||
struct TurtleTunnelRequestDisplayInfo
|
||||
{
|
||||
uint32_t request_id ; // Id of the request
|
||||
RsPeerId source_peer_id ; // Peer that relayed the request
|
||||
uint32_t age ; // Age in seconds
|
||||
uint32_t depth ; // Depth of the request. Might be altered.
|
||||
uint32_t request_id ; // Id of the request
|
||||
RsPeerId source_peer_id ; // Peer that relayed the request
|
||||
uint32_t age ; // Age in seconds
|
||||
uint32_t depth ; // Depth of the request. Might be altered.
|
||||
};
|
||||
struct TurtleSearchRequestDisplayInfo
|
||||
{
|
||||
uint32_t request_id ; // Id of the request
|
||||
RsPeerId source_peer_id ; // Peer that relayed the request
|
||||
uint32_t age ; // Age in seconds
|
||||
uint32_t depth ; // Depth of the request. Might be altered.
|
||||
uint32_t hits ;
|
||||
std::string keywords;
|
||||
};
|
||||
|
||||
|
@ -135,7 +142,7 @@ class RsTurtle
|
|||
// Get info from the turtle router. I use std strings to hide the internal structs.
|
||||
//
|
||||
virtual void getInfo(std::vector<std::vector<std::string> >&,std::vector<std::vector<std::string> >&,
|
||||
std::vector<TurtleRequestDisplayInfo>&,std::vector<TurtleRequestDisplayInfo>&) const = 0;
|
||||
std::vector<TurtleSearchRequestDisplayInfo>&,std::vector<TurtleTunnelRequestDisplayInfo>&) const = 0;
|
||||
|
||||
// Get info about turtle traffic. See TurtleTrafficStatisticsInfo members for details.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue