删除无用的代码

This commit is contained in:
anlicheng 2026-05-20 23:08:17 +08:00
parent 4c1e09cbbb
commit 5f36c28040
2 changed files with 1 additions and 33 deletions

View File

@ -1,33 +0,0 @@
//
// SDLAsyncTimerStream.swift
// Tun
//
// Created by on 2026/2/3.
//
import Foundation
class SDLAsyncTimerStream {
let timer: DispatchSourceTimer
let stream: AsyncStream<Void>
private let cont: AsyncStream<Void>.Continuation
init() {
self.timer = DispatchSource.makeTimerSource(queue: .global())
(stream, cont) = AsyncStream.makeStream(of: Void.self)
}
func start(interval: DispatchTimeInterval) {
timer.schedule(deadline: .now(), repeating: interval)
timer.setEventHandler { [weak self] in
self?.cont.yield()
}
timer.resume()
}
deinit {
self.cont.finish()
self.timer.cancel()
}
}

View File

@ -8,6 +8,7 @@
import Foundation
final class PacketInboundProcessor {
enum ProcessingAction {
case sendARPReply(dstMac: Data, data: Data)
case appendARP(ip: UInt32, mac: Data)