mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-06-28 05:29:29 +00:00
15 lines
362 B
Swift
15 lines
362 B
Swift
import Foundation
|
|
|
|
/// Protocol for creating WebSocket instances
|
|
@MainActor
|
|
protocol WebSocketFactory {
|
|
func createWebSocket() -> WebSocketProtocol
|
|
}
|
|
|
|
/// Default factory that creates real WebSocket instances
|
|
@MainActor
|
|
class DefaultWebSocketFactory: WebSocketFactory {
|
|
func createWebSocket() -> WebSocketProtocol {
|
|
URLSessionWebSocket()
|
|
}
|
|
}
|