2018-09-26 09:26:52 +00:00
|
|
|
//
|
|
|
|
// Copyright © 2018 WireGuard LLC. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
public class ExtensionMessage: Equatable {
|
|
|
|
|
|
|
|
public static let requestVersion = ExtensionMessage(0xff)
|
|
|
|
|
|
|
|
public let data: Data
|
|
|
|
|
|
|
|
private init(_ byte: UInt8) {
|
|
|
|
data = Data(bytes: [byte])
|
|
|
|
}
|
|
|
|
|
|
|
|
init(_ data: Data) {
|
|
|
|
self.data = data
|
|
|
|
}
|
|
|
|
|
|
|
|
// MARK: Equatable
|
2018-09-30 19:13:58 +00:00
|
|
|
public static func == (lhs: ExtensionMessage, rhs: ExtensionMessage) -> Bool {
|
2018-09-26 09:26:52 +00:00
|
|
|
return (lhs.data == rhs.data)
|
|
|
|
}
|
|
|
|
}
|