add macos
This commit is contained in:
parent
325a1674d3
commit
2c05d71dbe
@ -5,10 +5,10 @@ import PackageDescription
|
|||||||
|
|
||||||
let package = Package(
|
let package = Package(
|
||||||
name: "sdlan",
|
name: "sdlan",
|
||||||
// platforms: [
|
platforms: [
|
||||||
// .iOS(.v17),
|
.iOS(.v17),
|
||||||
// .macOS(.v14)
|
.macOS(.v14)
|
||||||
// ],
|
],
|
||||||
products: [
|
products: [
|
||||||
// Products define the executables and libraries a package produces, making them visible to other packages.
|
// Products define the executables and libraries a package produces, making them visible to other packages.
|
||||||
.library(
|
.library(
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import Combine
|
|||||||
1. 处理rsa的加解密逻辑
|
1. 处理rsa的加解密逻辑
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@available(macOS 14, *)
|
||||||
public class SDLContext: @unchecked Sendable {
|
public class SDLContext: @unchecked Sendable {
|
||||||
|
|
||||||
// 路由信息
|
// 路由信息
|
||||||
@ -583,12 +584,6 @@ public class SDLContext: @unchecked Sendable {
|
|||||||
self.superClient = nil
|
self.superClient = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//--MARK: 获取设备的UUID
|
|
||||||
|
|
||||||
extension SDLContext {
|
|
||||||
|
|
||||||
public static func getUUID() -> String {
|
public static func getUUID() -> String {
|
||||||
let userDefaults = UserDefaults.standard
|
let userDefaults = UserDefaults.standard
|
||||||
if let uuid = userDefaults.value(forKey: "gClientId") as? String {
|
if let uuid = userDefaults.value(forKey: "gClientId") as? String {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import Foundation
|
|||||||
import NIOCore
|
import NIOCore
|
||||||
|
|
||||||
// 网络类型探测器
|
// 网络类型探测器
|
||||||
|
@available(macOS 14, *)
|
||||||
struct SDLNatProber {
|
struct SDLNatProber {
|
||||||
|
|
||||||
// 定义nat类型
|
// 定义nat类型
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import NIOCore
|
|||||||
import NIOPosix
|
import NIOPosix
|
||||||
|
|
||||||
// 处理和sn-server服务器之间的通讯
|
// 处理和sn-server服务器之间的通讯
|
||||||
|
@available(macOS 14, *)
|
||||||
actor SDLNoticeClient {
|
actor SDLNoticeClient {
|
||||||
private let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
|
private let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
|
||||||
private let asyncChannel: NIOAsyncChannel<AddressedEnvelope<ByteBuffer>, AddressedEnvelope<ByteBuffer>>
|
private let asyncChannel: NIOAsyncChannel<AddressedEnvelope<ByteBuffer>, AddressedEnvelope<ByteBuffer>>
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import NIOCore
|
|||||||
import NIOPosix
|
import NIOPosix
|
||||||
|
|
||||||
// --MARK: 和SuperNode的客户端
|
// --MARK: 和SuperNode的客户端
|
||||||
|
@available(macOS 14, *)
|
||||||
actor SDLSuperClient {
|
actor SDLSuperClient {
|
||||||
private let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
|
private let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
|
||||||
private let asyncChannel: NIOAsyncChannel<ByteBuffer,ByteBuffer>
|
private let asyncChannel: NIOAsyncChannel<ByteBuffer,ByteBuffer>
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import NIOCore
|
|||||||
import NIOPosix
|
import NIOPosix
|
||||||
|
|
||||||
// 处理和sn-server服务器之间的通讯
|
// 处理和sn-server服务器之间的通讯
|
||||||
|
@available(macOS 14, *)
|
||||||
actor SDLUDPHole {
|
actor SDLUDPHole {
|
||||||
private let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
|
private let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
|
||||||
private let asyncChannel: NIOAsyncChannel<AddressedEnvelope<ByteBuffer>, AddressedEnvelope<ByteBuffer>>
|
private let asyncChannel: NIOAsyncChannel<AddressedEnvelope<ByteBuffer>, AddressedEnvelope<ByteBuffer>>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user