mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
unbreak i2lua build
This commit is contained in:
parent
d93361939c
commit
e384ec32b8
3 changed files with 27 additions and 0 deletions
11
TunnelPool.h
11
TunnelPool.h
|
@ -23,12 +23,21 @@ namespace tunnel
|
|||
class InboundTunnel;
|
||||
class OutboundTunnel;
|
||||
|
||||
|
||||
enum TunnelBuildResult {
|
||||
eBuildResultOkay, // tunnel was built okay
|
||||
eBuildResultRejected, // tunnel build was explicitly rejected
|
||||
eBuildResultTimeout // tunnel build timed out
|
||||
};
|
||||
|
||||
/** interface for custom tunnel peer selection algorithm */
|
||||
struct ITunnelPeerSelector
|
||||
{
|
||||
typedef std::shared_ptr<const i2p::data::IdentityEx> Peer;
|
||||
typedef std::vector<Peer> TunnelPath;
|
||||
|
||||
virtual bool SelectPeers(TunnelPath & peers, int hops, bool isInbound) = 0;
|
||||
virtual bool OnBuildResult(TunnelPath & peers, bool isInbound, TunnelBuildResult result) = 0;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<ITunnelPeerSelector> TunnelPeerSelector;
|
||||
|
@ -79,6 +88,8 @@ namespace tunnel
|
|||
/** @brief get the lowest latency tunnel in this tunnel pool regardless of latency requirements */
|
||||
std::shared_ptr<InboundTunnel> GetLowestLatencyInboundTunnel(std::shared_ptr<InboundTunnel> exclude=nullptr) const;
|
||||
std::shared_ptr<OutboundTunnel> GetLowestLatencyOutboundTunnel(std::shared_ptr<OutboundTunnel> exclude=nullptr) const;
|
||||
|
||||
void OnTunnelBuildResult(std::shared_ptr<Tunnel> tunnel, TunnelBuildResult result);
|
||||
|
||||
private:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue