diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-09-15 15:15:15 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-09-15 15:15:15 +0200 |
commit | f46762183a5fad4aba88379714abf1d21c3e1c54 (patch) | |
tree | c1d6070a4cd356ea24ac2e7ba7ba88896c54799c /src/types/endpoint.rs | |
parent | Begin work on the pure Wireguard implemenation (diff) | |
download | wireguard-rs-f46762183a5fad4aba88379714abf1d21c3e1c54.tar.xz wireguard-rs-f46762183a5fad4aba88379714abf1d21c3e1c54.zip |
Sent staged packets when key-pair confirmed
Diffstat (limited to '')
-rw-r--r-- | src/types/endpoint.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/types/endpoint.rs b/src/types/endpoint.rs index 02682a9..261203f 100644 --- a/src/types/endpoint.rs +++ b/src/types/endpoint.rs @@ -1,5 +1,6 @@ use std::net::SocketAddr; -pub trait Endpoint: Into<SocketAddr> + From<SocketAddr> + Copy + Send {} - -impl<T> Endpoint for T where T: Into<SocketAddr> + From<SocketAddr> + Copy + Send {} +pub trait Endpoint: Send { + fn from_address(addr: SocketAddr) -> Self; + fn into_address(&self) -> SocketAddr; +} |