185 Commits
Author SHA1 Message Date
Cory Benfield 1a2abc703a Fix tests with NIO 1.105.0 (#258) 2026-11-03 16:14:12 +00:00
apple-ospo[bot] f85ed684f4 Housekeeping: replace repo-level CODE_OF_CONDUCT (#256)
Replace repo-level CODE_OF_CONDUCT file with the inherited org-wide
[Code of
Conduct](https://github.com/apple/.github/blob/main/CODE_OF_CONDUCT.md)
in .github repo.

Co-authored-by: apple-ospo[bot] <326325757+apple-ospo[bot]@users.noreply.github.com>
2026-10-07 15:46:23 +01:00
Rafael Cepeda 8ffb0a84d5 Delete SECURITY.md (#255)
Deleting file in favour of org-wide
https://github.com/apple/.github/blob/main/SECURITY.md.
2026-09-14 16:12:23 +01:00
Aditya Singh f5b11d7931 Delete UNIX domain socket file after testBasicUnixSockets (#254)
## Motivation

`testBasicUnixSockets` binds a listener to a UNIX domain socket file
under `/tmp` (e.g. `/tmp/<uuid>_testBasicUnixSockets.sock`) but never
removes that file once the test finishes. Each run therefore leaves a
stale socket file behind, slowly littering `/tmp` on every test
invocation.

Fixes #53.

## Modifications

Added a `defer` block immediately after the socket path is computed that
removes the file with `FileManager.default.removeItem(atPath:)`. Because
`defer` blocks execute in LIFO order, this cleanup runs after the
existing `listener.close()`/`connection.close()` deferred closures, so
the socket is closed before the backing file is deleted. The removal is
best-effort (`try?`) so it never masks a genuine test failure.

## Result

`testBasicUnixSockets` no longer leaves a socket file in `/tmp` after
running. No behavioral change to the test's assertions.

Verified locally:
- `swift build` — Build complete.
- `swift test --filter NIOTSEndToEndTests/testBasicUnixSockets` — 1
test, 0 failures.
- Confirmed no `*_testBasicUnixSockets.sock` files remain in `/tmp`
after the run.
2026-05-29 08:44:10 +00:00
Rick Newton-Rogers 1ec239adec Migrate macOS build argument overrides to Swift version inputs (#253)
Motivation

* The shared `macos_tests.yml` workflow no longer accepts
  `xcode_16_2_build_arguments_override` and the `xcode_16_3` input is a
  no-op. Passing the removed input causes CI to fail.
* Older Xcodes are being removed from the runners; Swift version inputs
  are the replacement.

Modifications

* Replace `xcode_16_2/16_3_build_arguments_override` with
  `swift_6_1/6_2/6_3_build_arguments_override` carrying the same
  `-Xswiftc -Xfrontend -Xswiftc -require-explicit-sendable` value.

Result

* macOS CI passes again using the Swift version inputs.
2026-05-15 11:31:11 +02:00
Benedek KozmaandCory Benfield 67787bb645 Only depend on NIOFoundationCompat on Apple platforms (#251)
Only depend on NIOFoundationCompat on Apple platforms

### Motivation:


https://github.com/apple/swift-nio-transport-services/pull/211#issuecomment-4170778092

### Modifications:

Only depend on NIOFoundationCompat on Apple platforms because it's only
imported when Network can also be imported, so we don't unnecessarily
depend transitively on Foundation.

(We should use anyAppleOS as the condition if/when it becomes available
in SPM too: https://forums.swift.org/t/introducing-anyappleos/85728 )

### Result:

Stripped release binary is 20MB instead of 65MB in a project using
mqtt-nio

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
1.28.0
2026-04-22 12:22:57 +01:00
Rick Newton-Rogers 9d4e67af1e Drop Swift 6.0 (#252)
Motivation:

Swift 6.0 is no longer supported, we should bump the tools version and
remove it from our CI.

Modifications:

* Bump the Swift tools version to Swift 6.1
* Remove Swift 6.0 jobs where appropriate in main.yml, pull_request.yml

Result:

Code reflects our support window.
1.27.0
2026-04-08 14:04:47 +01:00
Rick Newton-Rogers 440d660986 Enable Swift 6.3 jobs in CI (#250)
Motivation:

Swift 6.3 has been released, we should add it to our CI coverage.

Modifications:

Add additional Swift 6.3 jobs where appropriate in main.yml,
pull_request.yml

Result:

Improved test coverage.
2026-04-07 13:14:15 +01:00
Rick Newton-Rogers 8ec97529a6 update actions/checkout from v4 to v6 (#249)
Motivation

* Following [GitHub's
announcement](https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/),
Node 20 is being deprecated and runners will begin using Node 24 by
default starting March 4th, 2026. Node 20 will reach end-of-life in
April 2026.

Modifications

* Upgrade GitHub Actions to their latest versions to ensure
compatibility with Node 24.
* Replace `actions/checkout@v4` with `actions/checkout@v6` in all
workflow files.

Result

* Workflow files reference `actions/checkout@v6`.
2026-03-02 13:25:44 +00:00
Rick Newton-Rogers a8b126edd1 switch from main to 0.0.7 for swiftlang workflows (#248)
Motivation

* `@main` references to `swiftlang/github-workflows` are deprecated.

Modifications

* Replace `@main` with `@0.0.7` in all workflow files.

Result

* Workflow files reference a pinned version of
`swiftlang/github-workflows`.
2026-02-20 13:25:11 +00:00
Cory BenfieldandGeorge Barnett 60c3e18715 Drop Swift 5.10 (#247)
Co-authored-by: George Barnett <gbarnett@apple.com>
1.26.0
2025-11-17 10:04:39 +00:00
Rick Newton-Rogers c858999595 Add explicit read permissions to workflows (#246)
Motivation:

* More secure GitHub Actions workflows

Modifications:

Add explicit 'contents: read' permissions to workflows that did not have
explicit permissions defined. This follows GitHub Actions security best
practices by limiting the default GITHUB_TOKEN permissions.

Result:

An extra layer of security.
2025-10-30 16:40:52 +00:00
Craig Munro df6c283550 Fixes premature closure of NIOTS UDP channels by not treating per-datagram isComplete as EOF. (#244)
Fix NIOTS UDP premature close by not treating per‑datagram isComplete as
EOF; add multi‑datagram tests and NIOTSEchoClient example.

  Motivation:

- While using [DNSClient
#40](https://github.com/orlandos-nl/DNSClient/issues/40), we observed
“one‑shot” behavior: a NIOTS connected‑UDP channel closed after the
first datagram, causing subsequent writes to fail or be dropped.
- Network.framework sets isComplete == true for each UDP datagram. This
indicates message completeness, not stream EOF. Treating that signal as
EOF caused the early close.
-
[PR#243](https://github.com/apple/swift-nio-transport-services/pull/243)
explored gating behavior differently (e.g., via
“completionClosesChannel”). This PR aligns EOF handling explicitly to
channel semantics (stream vs. datagram), which makes the reasoning
around transport semantics clear.
  - Alternatives considered (brief):
- ContentContext.isFinal only: common stream half‑closes (FIN) arrive
with isComplete == true and isFinal == false, so relying solely on
isFinal would miss EOF on streams and risk hangs.
- protocolMetadata (e.g., NWProtocolUDP.Metadata): metadata
presence/shape varies and is often empty on final callbacks; channel
semantics (isDatagramChannel) are explicit and robust.
- Reproducer (pre‑fix): set a symbolic breakpoint `br s -n
nw_connection_cancel`; run `testBasicChannelCommunication()` test;
typical backtrace after the echoed datagram:
- StateManagedNWConnectionChannel.dataReceivedHandler(content=<N bytes>,
isComplete=true, error=nil) → didReadEOF() →
StateManagedChannel.close0(error=eof) → nw_connection_cancel.
- Note error=nil: close was triggered solely because isComplete was
true.

  Modifications:

  - Transport fix:
- StateManagedNWConnectionChannel.dataReceivedHandler now calls
didReadEOF() only when isComplete && !isDatagramChannel (streams
unchanged; datagrams no longer misinterpret isComplete as EOF).
  - Tests:
- NIOTSDatagramBootstrapTests.testConnectedUDPEchoesTwoDatagrams
verifies two echoes on NIOTS connected UDP; both server and client
observe datagrams; bounded timeouts; proper cleanup.
-
NIOTSUDPMultiDatagramsPOSIXServerTests.testNIOTSClient_POSIXServer_MultipleDatagrams
verifies NIOTS client ↔ POSIX UDP echo; asserts two echoes to isolate
cross‑stack behavior.
  - Example:
- NIOTSEchoClient executable example (Apple platforms): simple
connected‑UDP echo client using NIOTSDatagramConnectionBootstrap;
guarded with `canImport(Network)` and `@available`; minimal usage notes.

  Result:

- Datagram channels (UDP) no longer misinterpret per‑packet completeness
as EOF; multi‑datagram send/receive works as expected.
- Stream channels (TCP/TLS) are unchanged; EOF continues to be detected
per existing behavior.
- Restores expected behavior so typical NIO UDP apps can be ported to
NIOTS by swapping event loops and datagram bootstraps (on Apple
platforms using Network.framework).
- Manual validation available via NIOTSEchoClient (pair with SwiftNIO’s
NIOUDPEchoServer).
1.25.2
2025-09-25 10:16:09 +01:00
Rick Newton-Rogers 21e2777214 Enable Swift 6.2 jobs in CI (#245)
Motivation:

Swift 6.2 has been released, we should add it to our CI coverage.

Modifications:

Add additional Swift 6.2 jobs where appropriate in main.yml,
pull_request.yml

Result:

Improved test coverage.
2025-09-22 13:20:13 +00:00
Keith Bauer abc6b757bb Since iOS 18, we're occasionally transitioned to the .setup state (#242)
Since iOS 18, we're occasionally transitioned to the .setup state

### Motivation:

Closes #237.

We don't know how to reproduce this problem though, only that it occurs
extremely rarely on iOS 18 & later (including 26).

### Modifications:

Simply removed a precondition failure if we're informed of a transition
to the `.setup` state. I see no harm in this — it wasn't previously
happening, and if it happens now then we'll do nothing.

The only concern might be if this represents some kind of "reset", after
which we'll then pass back through states we've already visited — that
could conceivably break us or downstream consumers. I don't know how to
know that, test for it, or otherwise deal with it, though…

### Result:

Hopefully, we just won't crash any more.
2025-09-08 08:14:25 +01:00
Raphael e645014bae Enable release mode builds (#241)
### Motivation:

Some errors do not show up in debug builds. Enabling release mode builds
improves the CI coverage.

### Modifications:

Enable release mode builds for pull requests and scheduled builds on
main.

### Result:

Improved CI coverage.
1.25.1
2025-07-30 08:54:46 +01:00
Rafael CepedaandCory Benfield 0dbab930a0 Added require-explicit-sendable compiler flag. (#240)
Enabled `-require-explicit-sendable` compiler flag on macOS CI. No
further changes needed.

Co-authored-by: Cory Benfield <lukasa@apple.com>
2025-07-23 08:42:28 +00:00
Fabian Fett ce7890222f NIOTSEventLoop conforms to NIOSerialEventLoopExecutor (#239)
Every EventLoop can also be a SerialExecutor. Let's opt into the default
NIO fast-path implementation.

SemVer patch as NIOTSEventLoop isn't public API.
2025-07-23 09:29:01 +01:00
Rick Newton-Rogers decfd23599 Add static SDK CI workflow (#226)
Add static SDK CI workflow which runs on commits to PRs, merges to main
and daily on main.
1.25.0
2025-06-26 10:54:42 +00:00
Rafael Cepeda 9224dc5159 Added buffer pool to NIOTSConnectionChannel (#236)
Added buffer pool to NIOTSConnectionChannel for reading messages.

### Motivation:

In order to avoid creating a new `ByteBuffer` for every single message
read from the channel, we decided to reuse the
`NIOPooledRecvBufferAllocator` type from NIOCore to leverage a pool of
buffers.

### Modifications:

Used the buffer allocation mechanism provided by the
`NIOPooledRecvBufferAllocator` to reuse and adapt previously created
receive buffers.

### Result:

Channel reads can now reuse previously created buffers, avoiding
unnecessary overhead by creating new buffers every single time.
2025-05-13 18:44:21 +01:00
Rick Newton-Rogers 7114435533 Drop Swift 5.9 (#235)
Motivation:

Swift 5.9 is no longer supported, we should bump the tools version and
remove it from our CI.

Modifications:

* Bump the Swift tools version to Swift 5.10
* Remove Swift 5.9 jobs where appropriate in main.yml, pull_request.yml

Result:

Code reflects our support window.
2025-05-05 12:13:58 +01:00
Gus Cairo d8443227d1 Change naming of datagram-related types to make them more consistent + fix docs (#233)
### Motivation:

The datagram-related types logically mirror the TCP-based ones
(`NIOTSDatagramListenerBootstrap` vs `NIOTSListenerBootstrap`;
`NIOTSListenerChannel` vs `NIOTSDatagramListenerChannel`;
`NIOTSDatagramChannel` vs `NIOTSDatagramConnectionChannel`;
`NIOTSDatagramBootstrap` vs `NIOTSConnectionBootstrap`).
However, some of the type names could more closely resemble their TCP
counterparts to make it easier to navigate the code/understand what
their purpose is.
Additionally, the docs for some of these types are wrong, as they've
been copy-pasted into the datagram versions without changes.

### Modifications:

There are separate commits for each of the following changes:
- Fix docs for `NIOTSDatagramListenerBootstrap` and rename the file to
match the type name.
- Rename `NIOTSDatagramConnectionChannelTests` to
`NIOTSDatagramBootstrapTests` (to match `NIOTSBootstrapTests`).
- Rename `NIOTSDatagramChannel` to `NIOTSDatagramConnectionChannel` (to
match `NIOTSConnectionChannel`)
- Fix docs for `NIOTSConnectionBootstrap`.
- Rename `NIOTSDatagramBootstrap` to `NIOTSDatagramConnectionBootstrap`
(to match `NIOTSConnectionBootstrap`). This one required a deprecate and
replace since it's a public type.

### Result:

Better docs and more consistency in our type names.
2025-04-29 13:56:21 +01:00
Gus Cairo cd1e89816d Add NWParameters configurator to bootstraps (#230)
Allow users to provide a closure taking an `NWParameters` to customise
them before they're used to create `NWConnection`s.

### Motivation:

`NWParameters` are currently created using the provided TLS and UDP
options, and then passed over to new `NWConnection`s. However, there are
more ways in which `NWParameters` can be customised, so this new API
provides a way for users to do this.

### Modifications:

Introduce new `configureNWParameters` methods to the existing bootstraps
to allow configuring a closure for customising `NWParameters`.

### Result:

Users can now customise the `NWParameters` used to create new
`NWConnection`s.
1.24.0
2025-04-16 14:33:56 +01:00
Rick Newton-Rogers 3d21b85af4 Enable Swift 6.1 jobs in CI (#232)
Motivation:

Swift 6.1 has been released, we should add it to our CI coverage.

Modifications:

Add additional Swift 6.1 jobs where appropriate in main.yml,
pull_request.yml

Result:

Improved test coverage.
2025-04-14 10:52:43 +01:00
Gus Cairo 9eb2ebde13 Fix missing strict concurrency error (#231)
Current strict concurrency checks don't work consistently in Xcode. This
PR adds an additional flag (`-Xfrontend`) to our set of strict
concurrency flags to make sure nothing has been missed when building. It
also fixes an additional error uncovered after adding it.
2025-04-09 15:08:12 +01:00
Gus Cairo 92bb536b7e Strict concurrency for NIOTransportServices and tests (#228) 2025-04-02 10:54:00 +01:00
Rick Newton-Rogers a9b23220e4 Enable macOS CI on pull requests (#229)
Motivation:

* Improve test coverage

Modifications:

Enable macOS CI to be run on pull request commits and make the use of
the nightly runner pool for main.yml jobs explicit.

Result:

Improved test coverage.
2025-04-01 17:40:20 +01:00
Rick Newton-Rogers a9da7c9aef Enable macOS CI on merge to main and daily timer (#227)
Enable macOS CI on merge to main and daily timer

### Motivation:

* Improve test coverage
* Check test pass/fail status
* Monitor CI throughput

### Modifications:

Enable macOS CI to be run on all merges to main and on a daily timer.

### Result:

Improved test coverage run out-of-band at the moment so we can get a
feeling for if any changes need to be made in the repo or in the CI
pipelines to ensure timely and stable checks.
2025-03-26 17:01:32 +01:00
Rick Newton-Rogers 888a842a61 Only apply standard swift settings on valid targets (#225)
Only apply standard swift settings on valid targets. The current check
ignores plugins but that is not comprehensive enough.
2025-03-07 15:07:17 +00:00
Rick Newton-Rogers 2724b3bf1d Rename nightly_6_1 params to nightly_next (#224)
Rename nightly_6_1 params to nightly_next; see
https://github.com/apple/swift-nio/pull/3122
2025-03-03 14:32:04 +00:00
George BarnettandCory Benfield 3c394067c0 Add missing Dispatch import (#223)
Motivation:

Dispatch wasn't imported in `NIOTSSingletons.swift` where `.default` was
used for the default QoS. This causes some build issues.

Modifications:

- Add missing Dispatch import

Result:

Fewer build issues

---------

Co-authored-by: Cory Benfield <lukasa@apple.com>
1.23.1
2025-01-31 10:26:33 +00:00
Rick Newton-Rogers 6d8ce3e72f CI use 6.1 nightlies (#222)
CI use 6.1 nightlies now that Swift development is happening in the 6.1
branch
2025-01-30 09:47:58 +00:00
Franz Busch 99035aa10a Update release.yml (#221)
Update the release.yml file with the latest label changes
2024-12-18 14:10:15 +01:00
Rick Newton-Rogers 3221911857 Enable MemberImportVisibility check on all targets (#220)
Enable MemberImportVisibility check on all targets. Use a standard
string header and footer to bracket the new block for ease of updating
in the future with scripts.
2024-12-13 15:08:51 +01:00
Franz Busch 12d758e454 Aligning semantic version label check name (#219) 2024-11-28 12:06:24 +00:00
Rick Newton-Rogers 96f8b71a21 remove unused Swift 6 language mode workflow (#217)
remove unused Swift 6 language mode workflow
2024-11-15 09:55:27 +00:00
Rick Newton-Rogers 57f583415a add .editorconfig file (#216)
add .editorconfig file
2024-11-15 09:53:25 +00:00
Rick Newton-Rogers a256daf533 Remove integration tests workflow (#215)
Remove the integration tests workflow from the main and scheduled jobs.

### Motivation:

There are no integration tests in this repository.
(see
https://github.com/apple/swift-nio-transport-services/actions/runs/11833082880)

### Modifications:

Remove the integration tests workflow from the main and scheduled jobs.

### Result:

No more scheduled run failures.
2024-11-14 09:52:09 +01:00
Rick Newton-Rogers ea297604dc Unify main.yml and scheduled.yml, remove 5_8 ref (#214)
### Motivation:

* `main.yml` and `scheduled.yml` are mostly duplicative.
* Scheduled runs failed because of a deprecated reference to a Swift 5.8
pipeline

### Modifications:

* Unify `main.yml` and `scheduled.yml`
* Remove the reference to the 5.8 pipeline

### Result:

Working scheduled runs.
2024-10-29 10:59:09 +00:00
Rick Newton-Rogers c73112efc0 Migrate CI to use GitHub Actions. (#213)
### Motivation:

To migrate to GitHub actions and centralised infrastructure.

### Modifications:

Changes of note:
* Adopt swift-format using rules from SwiftNIO. Modified so that it
ignores `NoAssignmentInExpressions` in some `XCTAssert` functions.
* Remove scripts and docker files which are no longer needed

### Result:

Feature parity with old CI.
2024-10-28 09:51:24 +00:00
Clinton Nkwocha bbd5e63cf9 Provide configurability for receiving connection data (#212)
Motivation:

Users are stuck with the hardcoded parameters for receiving data from a
connection.

Modifications:

- Add new options to `NIOTSChannelOptions` for configuring how to
receive data from a connection.

Result:

Users can configure how they receive data from a connection.
1.23.0
2024-10-17 13:14:45 +01:00
Cory Benfield fc398db673 Revert "Don't depend on NIOFoundationCompat in NIOTransportServices on Linux (#209)" (#210)
This reverts commit 40ffcdef46 in PR #209.

Unfortunately, Swift's behaviour around imports tends to be somewhat
"leaky". In this case, the leak is that the dependency on the
Package.swift allows downstream projects to import `NIOFoundationCompat`
without needing to actually specify the package dependency. This has
affected Hummingbird, which we noticed on our internal integration
testing functionality:

```
hummingbird/Sources/Hummingbird/Codable/JSON/JSONCoding.swift:18:8: error: no such module 'NIOFoundationCompat'
import NIOFoundationCompat
       ^
```

cc @Joannis @adam-fowler for the Hummingbird report.

Unfortunately, we can't make this change until we're willing to use a
semver major to achieve it. There may be some argument for doing that
now, as the semver major will be very cheap to adopt across the
ecosystem. But we'll need to do this in a considered way.

@Cyberbeni please feel free to reopen your PR targetting main, where we
can discuss whether this is worth issuing a semver major for.
2024-10-14 09:01:34 +01:00
Benedek Kozma 40ffcdef46 Don't depend on NIOFoundationCompat in NIOTransportServices on Linux (#209)
Don't depend on NIOFoundationCompat in NIOTransportServices on Linux

### Motivation:

I'm trying to build a small utility tool based on mqtt-nio which depends
on NIOTransportServices. I noticed that NIOTransportServices depends on
NIOFoundationCompat on all platforms but only imports it where the
Network framework is available. Removing this dependency on non-Apple
platforms allows us to not import Foundations, significantly reducing
the size of the build product when using the Swift Static Linux SDK.

### Modifications:

This PR and a similar one to mqtt-nio.

### Result:

Hello world docker image depending on mqtt-nio went from 169MB to 85MB.
2024-10-09 12:07:41 +02:00
George Barnett dbace16f12 We no longer require the docc plugin (#208)
Motivation:

Swift Package Index builds our docs for us and will automatically insert
the dependency.

Modifications:

- Remove the docc-plugin dependency

Result:

Fewer dependencies
1.22.0
2024-10-03 18:09:39 +01:00
Anthony DoeraeneandCory Benfield afd169118c Add configuration of multipathServiceType in NIOTSConnectionBootstrap (#205)
### Motivation:

Allow different devices to leverage the capabilities of Mutipath TCP
(MPTCP) to enhance the network reliability. Thanks to MPTCP, a
connection can for example automatically migrate to another interface if
it deteriorates on the first one. This can be especially interesting on
MacOS X and iOS, where devices may frequently benefit from multiple
interfaces (ethernet + Wi-Fi for Macs and Wi-fi + cellular for iOS).
Allowing developers to enable MPTCP on their connections seems thus like
a fine addition to this library.

### Modifications:

Added a function "withMultipath" on NIOTSConnectionBootstrap, that allow
to configure the type of service used for MPTCP (defaults to disabled).
This value will be stored in a field, and then propagated to the
underlying channel when the connect method will be called. Also updated
the parameters field of NIOTSConnectionChannel to set the
multipathServiceType accordingly.

### Result:

Users will now be able to easily enable Multipath TCP, allowing them to
benefit from seamless handover, interactive mode to automatically use
the lowest delay interface or aggregate mode to send data in parallel on
both interfaces.

Example: 
```swift
let group = NIOTSEventLoopGroup()
defer {
     try! group.syncShutdownGracefully()
}
let bootstrap = NIOTSConnectionBootstrap(group: group)
    .withMultipath(.handover)   // set handover mode
    .channelInitializer { channel in
        channel.pipeline.addHandler(MyChannelHandler())
    }
try! bootstrap.connect(host: "example.org", port: 12345).wait()
/* the Channel is now connected */
```

Co-authored-by: Cory Benfield <lukasa@apple.com>
2024-09-18 09:50:40 -07:00
99d28e05f7 Added support for connection viability updates (#207)
# Enhancement: Integration of Viability Handler in `Network.framework`

We have successfully integrated the `viabilityUpdateHandler` from
`Network.framework` into `NIOTransportServices`, enabling developers to
leverage the full potential of the `Network.framework` API.

This enhancement provides adopters with critical insights into the
viability of connections to remote endpoints. By being informed about
the current network status, developers can implement a more responsive
and adaptive approach to network behavior and conditions.

## Modifications

- Introduced two new methods along with corresponding calls to these
methods within the `Network.framework` handler.
- These handlers trigger the `NIO` *InboundEventsTriggered* method,
allowing consumers to respond to network changes effectively.
- Developed two structs within *NIOTSNetworkEvents* to accompany the
*InboundEventsTriggered* methods, ensuring seamless data transfer.
- Conformed these structs to Sendability for compatibility with the
required operating systems.

## Result

Clients can now receive viability events from `Network.framework`,
enhancing their ability to manage network connections dynamically

---------

Co-authored-by: George Barnett <gbarnett@apple.com>
Co-authored-by: Cory Benfield <lukasa@apple.com>
2024-09-16 14:11:19 +01:00
Franz Busch 32aa0a71b3 Add release.yml (#206) 2024-09-06 12:56:20 +01:00
Cory Benfield 38ac8221dd Add ChannelOptions to extract base types. (#203)
Motivation:

In some cases users may want to access APIs we haven't exposed
in NIOTransportServices. We should have a fallback that allows users
to do this.

Modifications:

- Add ChannelOptions for getting NWConnection and NWListener.

Result:

Users have an escape hatch
1.21.0
2024-05-13 18:30:13 +01:00
Cory Benfield 715e3179d3 Fix the syncOptions on most channels (#202)
Motivation:

Looks like when we previously added syncOptions support to our
channels, we had a few issues. The listeners had code added, but
the code never worked. This is because the code was defined in
subclasses, but the protocol conformance comes from the parent class,
and that parent class did not have a customized protocol witness.

The datagram channel was also entirely missing its support.

Modifications:

- Added the missing unit tests for sync options.
- Added syncOptions to StateManagedListenerChannel base class.
- Added overrides to the listener subclasses.
- Added syncOptions to datagram channel

Result:

Sync options actually work across the board.
2024-05-13 16:12:01 +01:00
George Barnett 4a0fad7658 Raise minimum Swift version to 5.8 (#199) 2024-03-11 09:32:56 +00:00