diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-11-24 18:41:43 +0100 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-11-24 18:41:43 +0100 |
commit | 3bff078e3f1c59454d8db14e5dc7603e6fdbeaba (patch) | |
tree | da301a422eb8aa38ac7960324b8b6fe2d0909302 /src/wireguard/timers.rs | |
parent | Daemonization (diff) | |
download | wireguard-rs-3bff078e3f1c59454d8db14e5dc7603e6fdbeaba.tar.xz wireguard-rs-3bff078e3f1c59454d8db14e5dc7603e6fdbeaba.zip |
Make IO traits suitable for Tun events (up/down)
Diffstat (limited to 'src/wireguard/timers.rs')
-rw-r--r-- | src/wireguard/timers.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wireguard/timers.rs b/src/wireguard/timers.rs index 5eb69dc..18f49bf 100644 --- a/src/wireguard/timers.rs +++ b/src/wireguard/timers.rs @@ -9,7 +9,7 @@ use hjul::{Runner, Timer}; use super::constants::*; use super::router::{message_data_len, Callbacks}; use super::{Peer, PeerInner}; -use super::{bind, tun}; +use super::{udp, tun}; use super::types::KeyPair; pub struct Timers { @@ -35,7 +35,7 @@ impl Timers { } } -impl<T: tun::Tun, B: bind::Bind> PeerInner<T, B> { +impl<T: tun::Tun, B: udp::UDP> PeerInner<T, B> { pub fn get_keepalive_interval(&self) -> u64 { self.timers().keepalive_interval @@ -224,7 +224,7 @@ impl Timers { pub fn new<T, B>(runner: &Runner, peer: Peer<T, B>) -> Timers where T: tun::Tun, - B: bind::Bind, + B: udp::UDP, { // create a timer instance for the provided peer Timers { @@ -335,7 +335,7 @@ impl Timers { pub struct Events<T, B>(PhantomData<(T, B)>); -impl<T: tun::Tun, B: bind::Bind> Callbacks for Events<T, B> { +impl<T: tun::Tun, B: udp::UDP> Callbacks for Events<T, B> { type Opaque = Arc<PeerInner<T, B>>; /* Called after the router encrypts a transport message destined for the peer. |