mirror of
https://github.com/warppipe/swift-torrent.git
synced 2026-05-28 15:27:20 +00:00
6c8c581517
Full BEP-3 peer wire protocol, BEP-5 DHT, BEP-15 UDP trackers, magnet link support, bencode serialization, rarest-first piece selection, and async session management using SwiftNIO and swift-crypto. Includes 64 passing unit tests. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
17 lines
299 B
Swift
17 lines
299 B
Swift
import Foundation
|
|
|
|
/// Base protocol for all alert types.
|
|
public protocol Alert: Sendable {
|
|
var timestamp: Date { get }
|
|
var category: AlertCategory { get }
|
|
}
|
|
|
|
public enum AlertCategory: Sendable {
|
|
case status
|
|
case error
|
|
case peer
|
|
case tracker
|
|
case storage
|
|
case dht
|
|
}
|