Skip to content

Commit

Permalink
Merge branch 'main' of github.com:OperatorFoundation/Transport into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Dr. Brandon Wiley committed Oct 5, 2020
2 parents cc17b1e + 9013238 commit e9fdb30
Show file tree
Hide file tree
Showing 9 changed files with 318 additions and 254 deletions.
18 changes: 18 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"object": {
"pins": [
{
"package": "Socket",
"repositoryURL": "https://github.com/OperatorFoundation/BlueSocket",
"state": {
"branch": null,
"revision": "90212ea8b66787c2d51d03527a04748ba6ee7679",
"version": "1.1.0"
}
},
{
"package": "Datable",
"repositoryURL": "https://github.com/OperatorFoundation/Datable.git",
Expand All @@ -9,6 +18,15 @@
"revision": "1c23f2b72d0d0cf4386fad05f8a5db4b91e8d304",
"version": "3.0.2"
}
},
{
"package": "NetworkLinux",
"repositoryURL": "https://github.com/OperatorFoundation/NetworkLinux.git",
"state": {
"branch": null,
"revision": "70d849482b2da95781cf72df3457e5cee7b3d3ad",
"version": "0.0.6"
}
}
]
},
Expand Down
5 changes: 3 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ let package = Package(
targets: ["Transport"]),
],
dependencies: [
.package(url: "https://github.com/OperatorFoundation/Datable.git", from: "3.0.2")
.package(url: "https://github.com/OperatorFoundation/Datable.git", from: "3.0.2"),
.package(url: "https://github.com/OperatorFoundation/NetworkLinux.git", from: "0.0.7"),
],
targets: [
.target(
name: "Transport",
dependencies: []),
dependencies: ["NetworkLinux"]),
.testTarget(
name: "TransportTests",
dependencies: ["Transport", "Datable"]),
Expand Down
7 changes: 6 additions & 1 deletion Sources/Transport/Connection.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import Foundation
import Network

#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import Network
#elseif os(Linux)
import NetworkLinux
#endif

public protocol Connection
{
Expand Down
6 changes: 5 additions & 1 deletion Sources/Transport/ConnectionFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//

import Foundation
import Network
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import Network
#elseif os(Linux)
import NetworkLinux
#endif

public protocol ConnectionFactory {

Expand Down
6 changes: 5 additions & 1 deletion Sources/Transport/Listener.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//

import Foundation
import Network
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import Network
#elseif os(Linux)
import NetworkLinux
#endif

public protocol Listener
{
Expand Down
6 changes: 5 additions & 1 deletion Sources/Transport/NWConnection+Connection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//

import Foundation
import Network
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import Network
#elseif os(Linux)
import NetworkLinux
#endif

extension NWConnection: Connection
{
Expand Down
6 changes: 5 additions & 1 deletion Sources/Transport/NWListener+Listener.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//

import Foundation
import Network
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import Network
#elseif os(Linux)
import NetworkLinux
#endif

extension NWListener: Listener
{
Expand Down
6 changes: 5 additions & 1 deletion Sources/Transport/NetworkConnectionFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
//

import Foundation
import Network
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
import Network
#elseif os(Linux)
import NetworkLinux
#endif

public class NetworkConnectionFactory: ConnectionFactory
{
Expand Down
Loading

0 comments on commit e9fdb30

Please sign in to comment.