diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-08-27 11:28:20 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-08-27 11:28:20 +0200 |
commit | a80e64014c21e092e35080baf29b2611d18c486a (patch) | |
tree | 6d9c044a54aa5a8c48a121397a1c4a89b37be1dc /src/main.rs | |
parent | Work on callback structure for cryptkey router (diff) | |
download | wireguard-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 'src/main.rs')
-rw-r--r-- | src/main.rs | 5 |
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 { |