add macos

This commit is contained in:
anlicheng 2025-08-03 23:26:30 +08:00
parent 325a1674d3
commit 2c05d71dbe
6 changed files with 9 additions and 10 deletions

View File

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

View File

@ -15,6 +15,7 @@ import Combine
1. rsa的加解密逻辑
*/
@available(macOS 14, *)
public class SDLContext: @unchecked Sendable {
//
@ -583,12 +584,6 @@ 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,6 +9,7 @@ import Foundation
import NIOCore
//
@available(macOS 14, *)
struct SDLNatProber {
// nat

View File

@ -19,6 +19,7 @@ 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,6 +10,7 @@ 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,6 +10,7 @@ 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>>