Compare commits

..

No commits in common. "2c05d71dbe3684e51e9de55910619156ebe360c6" and "45fda4ce9b30427acd0029746fdae0e4d5750c7f" have entirely different histories.

6 changed files with 8 additions and 7 deletions

View File

@ -7,7 +7,7 @@ let package = Package(
name: "sdlan",
platforms: [
.iOS(.v17),
.macOS(.v14)
.macOS(.v10_13)
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.

View File

@ -15,7 +15,6 @@ import Combine
1. rsa的加解密逻辑
*/
@available(macOS 14, *)
public class SDLContext: @unchecked Sendable {
//
@ -215,7 +214,7 @@ public class SDLContext: @unchecked Sendable {
case .changed:
// nat
Task {
self.natType = await SDLNatProber.getNatType(udpHole: self.udpHole, config: self.config, logger: self.logger)
self.natType = await SDLNatProber.getNatType(udpHole: self.udpHole, config: self.config)
self.logger.log("didNetworkPathChanged, nat type is: \(self.natType)", level: .info)
}
case .unreachable:
@ -584,6 +583,12 @@ public class SDLContext: @unchecked Sendable {
self.superClient = nil
}
}
//--MARK: UUID
extension SDLContext {
public static func getUUID() -> String {
let userDefaults = UserDefaults.standard
if let uuid = userDefaults.value(forKey: "gClientId") as? String {

View File

@ -9,7 +9,6 @@ import Foundation
import NIOCore
//
@available(macOS 14, *)
struct SDLNatProber {
// nat

View File

@ -19,7 +19,6 @@ import NIOCore
import NIOPosix
// sn-server
@available(macOS 14, *)
actor SDLNoticeClient {
private let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
private let asyncChannel: NIOAsyncChannel<AddressedEnvelope<ByteBuffer>, AddressedEnvelope<ByteBuffer>>

View File

@ -10,7 +10,6 @@ import NIOCore
import NIOPosix
// --MARK: SuperNode
@available(macOS 14, *)
actor SDLSuperClient {
private let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
private let asyncChannel: NIOAsyncChannel<ByteBuffer,ByteBuffer>

View File

@ -10,7 +10,6 @@ import NIOCore
import NIOPosix
// sn-server
@available(macOS 14, *)
actor SDLUDPHole {
private let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
private let asyncChannel: NIOAsyncChannel<AddressedEnvelope<ByteBuffer>, AddressedEnvelope<ByteBuffer>>