21 Commits

Author SHA1 Message Date
George Barnett
20c59b2d64
Strict concurrency for NIOExtras and NIOExtrasTests (#254) 2025-03-31 11:53:06 +01:00
Marc Prud'hommeaux
aa0d902637
Android support (#244)
Add Android support

### Motivation:

Support the Android platform.

### Modifications:

Add Android imports and fix the default temporary directory to be
correct for the OS.

### Result:

The package will build and test on Android.

---------

Co-authored-by: George Barnett <gbarnett@apple.com>
2025-01-14 16:48:42 +00:00
George Barnett
74a143a79f
Fix warnings (#245)
Motivation:

The latest NIO release deprecated a number of APIs and added more
Sendable contraints.

Modifications:

- Use sync APIs where possible
- Use `_deprecated` but not `@deprecated` NIOFileHandle API
- Stop using NIOAny

Result:

No warnings
2025-01-14 11:24:08 +00:00
Rick Newton-Rogers
5c7978016e
Enable MemberImportVisibility check on all targets (#240)
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:07:05 +01:00
Rick Newton-Rogers
3f776e9aaf
Migrate CI to use GitHub Actions. (#234)
### Motivation:

To migrate to GitHub actions and centralised infrastructure.

### Modifications:

Changes of note:
* Adopt swift-format using rules from SwiftNIO
* Remove scripts and docker files which are no longer needed

### Result:

Feature parity with old CI.
2024-10-28 14:00:57 +00:00
Alastair Houghton
373b8bba29
Changes for Musl support. (#211)
Make sure we import `Musl` rather than `Glibc`.
2023-11-28 08:38:46 -08:00
Rick Newton-Rogers
6c3819cf2a
Bump minimum Swift version to 5.7 (#207)
Motivation:

Now that Swift 5.9 is GM we should update the supported versions and
remove 5.6

Modifications:

* Update `Package.swift`
* Remove `#if swift(>=5.7)` guards
* Delete the 5.6 docker compose file and make a 5.10 one
* Update docs

Result:

Remove support for Swift 5.6, add 5.10
2023-10-04 10:17:34 +01:00
Franz Busch
fb70a0f5e9
Use #if canImport(Darwin) where possible (#201) 2023-06-21 14:12:47 +01:00
Cory Benfield
9cdb93e321
Drop Swift 5.5 (#197)
Motivation

Per SwiftNIO's formal version policy, we are ready to drop support for
Swift 5.5.

Modifications

This patch removes the support for 5.5 and all supporting
infrastructure. This includes the test generation functionality, which
is no longer required, as well as the files generated by that
functionality. It updates the dockerfile for 5.8, and it removes all
conditional compilation checks that are now definitionally true.

Result

A nice, clean, 5.6+ codebase
2023-04-13 16:47:28 +01:00
Cory Benfield
cc1e527507
Make SynchronizedFileSink.close unavailable from async (#195)
Motivation

syncClose will block whatever thread it's on indefinitely. That makes it
unsafe to call in async contexts.

Modifications

Add a new close() method that's async.
Make the existing method unavailable from async.
Add some tests.

Results

Easier to close these from async contexts
2023-03-03 05:48:20 -08:00
David Nadoba
985a485f71
Remove #if compiler(>=5.5) (#182) 2022-10-13 14:04:27 +01:00
David Nadoba
5334d949fe
Adopt Sendable in NIOExtras (#174)
Incremental `Sendable` adoption.

Co-authored-by: Cory Benfield <lukasa@apple.com>
2022-08-23 15:20:41 +01:00
Peter Adams
dabef818d3
Simple index pages for docc (#170)
Motivation:

An index page ties all the other documentation together

Modifications:

Add index pages for the library targets.
Correct a few minor errors in the main docs.

Result:

A more joined up documentation experience.
2022-08-12 07:31:17 -07:00
Peter Adams
da7c04777b
Docnioextras (#169)
* Improve documentation for NIOExtras

Motivation:

Docs will help users do things correctly.

Modifications:

Add missing comments, improve links.

Result:

Better docc documentation

* Docc in NIOHTTPCompression

* NIOSOCKS docc

* Correct bad symbol

* Minor typo

Co-authored-by: Cory Benfield <lukasa@apple.com>
2022-08-03 01:34:45 -07:00
David Evans
e4dc3c8d1d
Implement Sendable (#160)
Make every non-channel class conform to Sendable (or @unchecked Sendable) to prepare for NIO.
2022-05-04 11:46:21 +01:00
Cory Benfield
6f8038f8dd
Strip a NIO. (#148)
That's not what the type is called.
2021-12-03 11:26:46 +01:00
Cory Benfield
d66ae0557e
Clean up imports and dependencies. (#144)
Motivation:

With NIO 2.32.0 we broke the core NIO module up into modules that split
apart the POSIX layer and the core abstractions. As a result, this
package no longer needs to express a hard dependency on the POSIX layer.

Modifications:

- Rewrote imports of NIO to NIOCore.
- Added NIOEmbedded and NIOPosix imports where necessary in tests.
- Extended soundness script to detect NIO imports.
- Note that the main modules still depend on NIO, which is necessary
    for backwards-compatibility reasons. This dependency is unused.

Result:

No need to use NIOPosix.
2021-09-14 16:30:39 +01:00
Johannes Weiss
7cd24c0efc
WritePCAPHandler: support logging more than 4GiB of data (#85)
Motivation:

Previously, WritePCAPHandler would crash if more than 4GiB of data were
either received or sent through the same instance of the
WritePCAPHandler because of a UInt32 overflow representing the TCP
sequence/ACK numbers.

Modifications:

Make TCP sequence/ACK numbers wrap around correctly.

Result:

- now you can send/receive up to 16 EiB of data :P.
- fixes rdar://61887658
2020-05-18 11:37:20 +01:00
Johannes Weiss
a98eabea3f
NIOWritePCAPHandler: make pcap issuing configurable (#75) 2020-01-20 15:15:36 +00:00
Johannes Weiss
698f4f7396 WritePCAPHandler: write outbound data on flush not write (#74) 2020-01-17 14:12:34 +00:00
Johannes Weiss
96e8335180
write PCAP handler (#46)
Motivation:

Especially with TLS but also without, in real production environments it
can be handy to be able to write pcap files from NIO directly.

Modifications:

add a ChannelHandler that can write a PCAP trace from what's going on in
the ChannelPipeline.

Result:

easier debugging in production
2019-04-12 15:08:10 +01:00