Skip to content

Commit

Permalink
Bump to Swift 5.10 and nest the connector protocol.
Browse files Browse the repository at this point in the history
  • Loading branch information
mickeyl committed Jul 17, 2024
1 parent f781813 commit 94203c8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
9 changes: 5 additions & 4 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"originHash" : "3e8b58a52ac40e39626cfccd52a0e16c5b7ae7277adb7adc9a190a6c45c151ab",
"pins" : [
{
"identity" : "anycodable",
Expand All @@ -24,7 +25,7 @@
"location" : "https://github.com/Cornucopia-Swift/CornucopiaCore",
"state" : {
"branch" : "master",
"revision" : "c0346f93f603ff63aa72523094c0397686c71f45"
"revision" : "c4b3ee10c067395fdb9daaa93eaf61c4017323a5"
}
},
{
Expand Down Expand Up @@ -59,10 +60,10 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-crypto",
"state" : {
"revision" : "bc1c29221f6dfeb0ebbfbc98eb95cd3d4967868e",
"version" : "3.4.0"
"revision" : "46072478ca365fe48370993833cb22de9b41567f",
"version" : "3.5.2"
}
}
],
"version" : 2
"version" : 3
}
2 changes: 1 addition & 1 deletion Package.swift
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

Expand Down
22 changes: 11 additions & 11 deletions Sources/CornucopiaStreams/Protocols/Connector.swift
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()
}
}

0 comments on commit 94203c8

Please sign in to comment.