aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-08-27 11:28:20 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-08-27 11:28:20 +0200
commita80e64014c21e092e35080baf29b2611d18c486a (patch)
tree6d9c044a54aa5a8c48a121397a1c4a89b37be1dc /src/main.rs
parentWork on callback structure for cryptkey router (diff)
downloadwireguard-rs-a80e64014c21e092e35080baf29b2611d18c486a.tar.xz
wireguard-rs-a80e64014c21e092e35080baf29b2611d18c486a.zip
Unbox callback closures
Accepted the more verbose type signatures and added a callback to request new key-material.
Diffstat (limited to '')
-rw-r--r--src/main.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index ae90251..5c58b24 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -27,8 +27,9 @@ fn main() {
let router = router::Device::new(
4,
- |t: &PeerTimer, data: bool| t.a.reset(Duration::from_millis(1000)),
- |t: &PeerTimer, data: bool| t.b.reset(Duration::from_millis(1000)),
+ |t: &PeerTimer, data: bool, sent: bool| t.a.reset(Duration::from_millis(1000)),
+ |t: &PeerTimer, data: bool, sent: bool| t.b.reset(Duration::from_millis(1000)),
+ |t: &PeerTimer| println!("new key requested"),
);
let pt = PeerTimer {