Skip to content

Commit

Permalink
add support for VisionOS
Browse files Browse the repository at this point in the history
  • Loading branch information
navanchauhan committed Dec 19, 2023
1 parent 4463282 commit 18effc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/swiftGopherClient/gopherClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class GopherClient {
///
/// It automatically chooses the appropriate `EventLoopGroup` based on the running platform.
public init() {
if #available(macOS 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *) {
if #available(macOS 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, visionOS 1.0, *) {
self.group = NIOTSEventLoopGroup()
} else {
self.group = MultiThreadedEventLoopGroup(numberOfThreads: System.coreCount)
Expand All @@ -44,7 +44,7 @@ public class GopherClient {
to host: String, port: Int = 70, message: String,
completion: @escaping (Result<[gopherItem], Error>) -> Void
) {
if #available(macOS 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, *) {
if #available(macOS 10.14, iOS 12.0, tvOS 12.0, watchOS 6.0, visionOS 1.0, *) {
let bootstrap = NIOTSConnectionBootstrap(group: group)
.channelOption(ChannelOptions.socketOption(.so_reuseaddr), value: 1)
.channelInitializer { channel in
Expand Down

0 comments on commit 18effc4

Please sign in to comment.