Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions swift/TailscaleKit/IncomingConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import Foundation
/// IncomingConnection is use to read incoming message from an inbound
/// connection. IncomingConnections are not instantiated directly,
/// they are returned by Listener.accept
// Gated so the rest of TailscaleKit can be built for older systems.
// `state()` returns `any AsyncSequence<ListenerState, Never>`, whose `Failure`
// associated type is iOS 18 / macOS 15 only, and that requirement propagates to
// the whole framework even for clients that never listen for inbound
// connections. Annotating the two listener types confines it to them.
@available(iOS 18.0, macOS 15.0, tvOS 18.0, watchOS 11.0, *)
public actor IncomingConnection {
private let logger: LogSink?
private var conn: TailscaleConnection = 0
Expand Down
6 changes: 6 additions & 0 deletions swift/TailscaleKit/Listener.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import Foundation

/// A Listener is used to await incoming connections from another
/// Tailnet node.
// Gated so the rest of TailscaleKit can be built for older systems.
// `state()` returns `any AsyncSequence<ListenerState, Never>`, whose `Failure`
// associated type is iOS 18 / macOS 15 only, and that requirement propagates to
// the whole framework even for clients that never listen for inbound
// connections. Annotating the two listener types confines it to them.
@available(iOS 18.0, macOS 15.0, tvOS 18.0, watchOS 11.0, *)
public actor Listener {
private var tailscale: TailscaleHandle
private var listener: TailscaleListener = 0
Expand Down