Files
tart/Sources/tart/Network/NetworkBridged.swift
T
Fedor Korotkov 896d03ce0b Fixed Swift Warning (#787)
* Fixed Swift Warning

Plus updated all the dependencies and Swift Tools.

Fixes #785

* Fixed race condition
2024-04-11 19:53:10 +04:00

24 lines
511 B
Swift

import Foundation
import Semaphore
import Virtualization
class NetworkBridged: Network {
let interfaces: [VZBridgedNetworkInterface]
init(interfaces: [VZBridgedNetworkInterface]) {
self.interfaces = interfaces
}
func attachments() -> [VZNetworkDeviceAttachment] {
interfaces.map { VZBridgedNetworkDeviceAttachment(interface: $0) }
}
func run(_ sema: AsyncSemaphore) throws {
// no-op, only used for Softnet
}
func stop() async throws {
// no-op, only used for Softnet
}
}