aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/Shared/Model/Endpoint.swift
diff options
context:
space:
mode:
Diffstat (limited to 'WireGuard/Shared/Model/Endpoint.swift')
-rw-r--r--WireGuard/Shared/Model/Endpoint.swift4
1 files changed, 2 insertions, 2 deletions
diff --git a/WireGuard/Shared/Model/Endpoint.swift b/WireGuard/Shared/Model/Endpoint.swift
index b29a5a8d..03de1318 100644
--- a/WireGuard/Shared/Model/Endpoint.swift
+++ b/WireGuard/Shared/Model/Endpoint.swift
@@ -7,7 +7,7 @@ import Network
struct Endpoint {
let host: NWEndpoint.Host
let port: NWEndpoint.Port
-
+
init(host: NWEndpoint.Host, port: NWEndpoint.Port) {
self.host = host
self.port = port
@@ -25,7 +25,7 @@ extension Endpoint {
return "[\(address)]:\(port)"
}
}
-
+
init?(from string: String) {
// Separation of host and port is based on 'parse_endpoint' function in
// https://git.zx2c4.com/WireGuard/tree/src/tools/config.c