From 1d24f7a182698f6730fab9645f3a7d0bc6e96c43 Mon Sep 17 00:00:00 2001 From: consuelita Date: Thu, 11 Nov 2021 15:06:05 -0600 Subject: [PATCH] Updated to use Transmission >= 1.0.0 --- Package.swift | 6 +++--- Sources/ShadowSwift/DarkStarConnection.swift | 2 +- Sources/ShadowSwift/ShadowConnection.swift | 2 +- Sources/ShadowSwift/ShadowServer.swift | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Package.swift b/Package.swift index b4a9f4c..925a404 100644 --- a/Package.swift +++ b/Package.swift @@ -14,11 +14,11 @@ let package = Package( targets: ["ShadowSwift"]), ], dependencies: [ - .package(url: "https://github.com/OperatorFoundation/Chord.git", from: "0.0.12"), - .package(url: "https://github.com/OperatorFoundation/Datable.git", from: "3.1.0"), + .package(url: "https://github.com/OperatorFoundation/Chord.git", from: "0.0.15"), + .package(url: "https://github.com/OperatorFoundation/Datable.git", from: "3.1.2"), .package(url: "https://github.com/apple/swift-log.git", from: "1.4.2"), .package(url: "https://github.com/OperatorFoundation/SwiftHexTools.git", from: "1.2.2"), - .package(url: "https://github.com/OperatorFoundation/Transmission.git", from: "0.2.3"), + .package(url: "https://github.com/OperatorFoundation/Transmission.git", from: "1.0.4"), .package(url: "https://github.com/OperatorFoundation/Transport.git", from: "2.3.5"), .package(url: "https://github.com/apple/swift-crypto", from: "2.0.0") ], diff --git a/Sources/ShadowSwift/DarkStarConnection.swift b/Sources/ShadowSwift/DarkStarConnection.swift index fb27af9..4d69783 100644 --- a/Sources/ShadowSwift/DarkStarConnection.swift +++ b/Sources/ShadowSwift/DarkStarConnection.swift @@ -68,7 +68,7 @@ open class DarkStarConnection: Transport.Connection let endpoint = NWEndpoint.hostPort(host: host, port: port) #if (os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) - guard let newConnection = Transmission.Connection(host: "\(host)", port: Int(port.rawValue)) + guard let newConnection = Transmission.TransmissionConnection(host: "\(host)", port: Int(port.rawValue)) else { logger.error("Failed to initialize a ShadowConnection because we could not create a Network Connection using host \(host) and port \(Int(port.rawValue)).") diff --git a/Sources/ShadowSwift/ShadowConnection.swift b/Sources/ShadowSwift/ShadowConnection.swift index ea85c37..fd8c6b0 100644 --- a/Sources/ShadowSwift/ShadowConnection.swift +++ b/Sources/ShadowSwift/ShadowConnection.swift @@ -67,7 +67,7 @@ open class ShadowConnection: Transport.Connection logger: Logger) { #if (os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) - guard let newConnection = Transmission.Connection(host: "\(host)", port: Int(port.rawValue)) + guard let newConnection = Transmission.TransmissionConnection(host: "\(host)", port: Int(port.rawValue)) else { logger.error("Failed to initialize a ShadowConnection because we could not create a Network Connection using host \(host) and port \(Int(port.rawValue)).") diff --git a/Sources/ShadowSwift/ShadowServer.swift b/Sources/ShadowSwift/ShadowServer.swift index a12a08b..ef67f5d 100644 --- a/Sources/ShadowSwift/ShadowServer.swift +++ b/Sources/ShadowSwift/ShadowServer.swift @@ -26,7 +26,7 @@ public class ShadowServer self.endpoint = NWEndpoint.hostPort(host: NWEndpoint.Host.ipv4(IPv4Address(host)!), port: NWEndpoint.Port(integerLiteral: UInt16(port))) - guard let listener = Listener(port: port) else {return nil} + guard let listener = TransmissionListener(port: port, logger: nil) else {return nil} self.listener = listener }