aboutsummaryrefslogtreecommitdiffstats
path: root/src/ratelimiter.rs
diff options
context:
space:
mode:
authorJake McGinty <me@jake.su>2018-05-17 19:43:29 -0700
committerJake McGinty <me@jake.su>2018-05-17 19:44:58 -0700
commitc8a8b6a568e2bb78bdd1470e0fba1fb360b769ee (patch)
treeecf545d13f9147e671e22890f5d4ce0ede7e2204 /src/ratelimiter.rs
parentglobal: don't directly rely on tokio 'meta' crate (diff)
downloadwireguard-rs-c8a8b6a568e2bb78bdd1470e0fba1fb360b769ee.tar.xz
wireguard-rs-c8a8b6a568e2bb78bdd1470e0fba1fb360b769ee.zip
peer_server: use unbounded channels, ratelimiter wip
unbounded channels are easier to deal with now, and bounded channels weren't actually doing anything useful.
Diffstat (limited to 'src/ratelimiter.rs')
-rw-r--r--src/ratelimiter.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ratelimiter.rs b/src/ratelimiter.rs
index ee916fc..bdc5c7c 100644
--- a/src/ratelimiter.rs
+++ b/src/ratelimiter.rs
@@ -24,7 +24,7 @@ struct Entry {
pub tokens : u64,
}
-struct RateLimiter {
+pub struct RateLimiter {
table : HashMap<IpAddr, Entry>,
rx : mpsc::Receiver<()>,
}