-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump to Swift 5.10 and nest the connector protocol.
- Loading branch information
Showing
3 changed files
with
17 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// swift-tools-version: 5.7 | ||
// swift-tools-version: 5.10 | ||
|
||
import PackageDescription | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
// | ||
// Cornucopia – (C) Dr. Lauer Information Technology | ||
// | ||
import CornucopiaCore | ||
import Foundation | ||
|
||
/// Describes a transport connector protocol. | ||
protocol _CornucopiaTransportConnector { | ||
extension Cornucopia.Streams { | ||
|
||
/// Creates a connector for connecting to the specified ``URL``. | ||
init(url: URL) | ||
/// Connects and returns a stream pair. | ||
func connect() async throws -> Cornucopia.Streams.StreamPair | ||
/// Cancels this connection, if possible. | ||
func cancel() | ||
} | ||
/// Describes a transport connector protocol. | ||
protocol Connector { | ||
|
||
extension Cornucopia.Streams { typealias Connector = _CornucopiaTransportConnector } | ||
/// Creates a connector for connecting to the specified ``URL``. | ||
init(url: URL) | ||
/// Connects and returns a stream pair. | ||
func connect() async throws -> Cornucopia.Streams.StreamPair | ||
/// Cancels this connection, if possible. | ||
func cancel() | ||
} | ||
} |