aboutsummaryrefslogtreecommitdiffstats
path: root/src/platform/dummy/bind.rs
diff options
context:
space:
mode:
authorMathias Hall-Andersen <mathias@hall-andersen.dk>2019-10-23 14:00:21 +0200
committerMathias Hall-Andersen <mathias@hall-andersen.dk>2019-10-23 14:00:21 +0200
commit8107973342a31e8d654d31c1bb06786fc033d86c (patch)
treeb0de39c32c76e098480f4237b02ed66e542b813c /src/platform/dummy/bind.rs
parentMoved IO traits into platform module (diff)
downloadwireguard-rs-8107973342a31e8d654d31c1bb06786fc033d86c.tar.xz
wireguard-rs-8107973342a31e8d654d31c1bb06786fc033d86c.zip
Work on pure WireGuard test
Diffstat (limited to '')
-rw-r--r--src/platform/dummy/bind.rs26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/platform/dummy/bind.rs b/src/platform/dummy/bind.rs
index 14143ae..5010597 100644
--- a/src/platform/dummy/bind.rs
+++ b/src/platform/dummy/bind.rs
@@ -1,13 +1,14 @@
use std::error::Error;
use std::fmt;
use std::marker;
-use std::net::SocketAddr;
+
use std::sync::mpsc::{sync_channel, Receiver, SyncSender};
use std::sync::Arc;
use std::sync::Mutex;
use super::super::bind::*;
use super::super::Endpoint;
+use super::UnitEndpoint;
pub struct VoidOwner {}
@@ -57,29 +58,6 @@ impl fmt::Display for TunError {
}
}
-/* Endpoint implementation */
-
-#[derive(Clone, Copy)]
-pub struct UnitEndpoint {}
-
-impl Endpoint for UnitEndpoint {
- fn from_address(_: SocketAddr) -> UnitEndpoint {
- UnitEndpoint {}
- }
-
- fn into_address(&self) -> SocketAddr {
- "127.0.0.1:8080".parse().unwrap()
- }
-
- fn clear_src(&mut self) {}
-}
-
-impl UnitEndpoint {
- pub fn new() -> UnitEndpoint {
- UnitEndpoint {}
- }
-}
-
#[derive(Clone, Copy)]
pub struct VoidBind {}