Releases: apple/swift-nio
Releases · apple/swift-nio
SwiftNIO 1.6.0
Semver Minor
- Added new
UnsafeEmbeddedAtomic
type. (#373) - Added
prepend
,removeLast
, andlast
toCircularBuffer
. (#347)
Semver Patch
- Removed warnings in Swift 4.2. (#374)
- Added more license documentation for 3rd party modules. (#251)
- Fixed an issue where connect promises could be leaked without being failed. (#337)
- Reduced the number of memory allocations required to create an
EventLoopFuture
. (#373) ByteBuffer
's debug output is now compatible with being parsed byxxd
. (#367)- Fixed a bug where WebSocket frames could be delivered multiple times on connection closure. (#368)
ByteBuffer.discardReadBytes
no longer triggers a memory copy if the buffer was fully consumed. (#363)- Improved the ability of the compiler to specialise
ByteBuffer
copies of contiguous data types. (#360) - Worked around an optimiser bug that caused unnecessary heap allocations when writing
StaticString
objects intoByteBuffer
s. (#354) - Added dtrace scripts for debugging memory allocations. (#352)
- Greatly reduced the overhead of passing
HTTPRequestHead
andHTTPResponseHead
around theChannelPipeline
by placing them into a CoW heap-allocated box. (#351) - Shrunk the size of
ByteBuffer
andFileRegion
to fewer than 3 words, ensuring that enums that wrap these types can still fit into an existential container without triggering heap allocation. (#349) - Fixed a bug where the
HTTPServerPipelineHandler
would incorrectly deliver message parts out of order. (#348) - Fixed a bug where
Channel.localAddress
andChannel.remoteAddress
would benil
duringchannelInactive
andhandlerRemoved
callbacks. (#346) - Improved the performance of
HTTPHeaders[canonicalForm:]
in the case where no headers with that header name exist. (#344) - Miscellaneous code & testing improvements. (#335, #338, #353, #356, #357, #358, #361, #362, #365, #366, #371, #375, #376)
- Documentation improvements. (#359)
SwiftNIO 1.5.1
SwiftNIO 1.5.0
Semver Minor
- Improved
HTTPServerProtocolErrorHandler
andHTTPServerPipelineHandler
to interact better together.HTTPServerPipelineHandler
now also buffers protocol errors, preventing theChannelPipeline
from seeing those errors until the correct sequence point.HTTPServerProtocolErrorHandler
now avoids emitting 400 errors if a partial response is already in flight. (#314) - Enhanced
WebSocketUpgrader
to allow overriding the default maximum websocket frame size. (#315) - Made
IdleStateHandler.IdleStateEvent
public: it had accidentally been made internal. (#319) - Enhanced the
ChannelCore
protocol withunwrapData
, allowing externalChannelCore
implementers to unwrapNIOAny
wrappers. (#321) - Enhanced
BlockingIOThreadPool
with arunWithActive
method that automatically fails submitted tasks if the pool has been shut down. (#256) - Enhanced
NonBlockingFileIO
struct with a non-blockingopenFile
method, allowing users to avoid making blockingopen
syscalls. (#256) - Made
HTTPResponseHead
andHTTPRequestHead
mutable. (#324) - Enhanced all NIO core channels with support for registering already-active sockets (that is, sockets that have had
connect
,listen
, orbind
called on them already) with NIO event loops, preventing the need to double-call some of these syscalls, an operation that is not always safe. (#285) - Enhanced the
ServerBootstrap
andDatagramBootstrap
with awithBoundSocket(descriptor:)
method that can take an already-bound socket and use it as the basis for a channel. (#285) - Enhanced the
ClientBootstrap
with awithConnectedSocket(descriptor:)
method that can take an already-connected socket and use it as the basis for a channel. (#285)
Semver Patch
- Fixed issues in HTTP/1 framing where some requests and methods that never have bodies would not parse correctly if they were missing transport headers. (#298)
- Fixed issues in HTTP/1 framing where EOF was not being passed to the parser to help it decode request/response bodies that are terminated by EOF. (#298)
- Improved the performance of writing the HTTP/1 request-line and response-line in most cases. (#300)
- Reduced the number of heap allocations required to manage the state of pending stream writes. (#308)
- Started processing EOF and socket reset eagerly, rather than attempting to buffer it. This resolved a number of issues with hot-looping on
epoll_wait
. (#286, #325) - Vastly reduced the number of allocations required to write/read integers to/from
ByteBuffer
s. (#316) - Improved error handling when
connect
fails synchronously, preventing the FD from being registered with the selector. (#329) - Started failing pending connect promises before notifying the pipeline of change
channelInactive
, instead of after. (#330) - Many fixes and improvements to the tests. (#311, #318, #326, #332, #331, #334)
- Miscellaneous code improvements (#312)
SwiftNIO 1.4.2
SwiftNIO 1.4.1
Semver Patch
- Restore unary initializer for
HTTPHeaders
. (#301)
SwiftNIO 1.4.0
Semver Minor
- More strictly enforced channel lifecycle tracking. This will cause new errors to be thrown if channels are mishandled by the NIO core. (#220)
- Added
EventLoopFuture.fold
. (#269) - Added
EventLoopFuture.reduce
andEventLoopFuture.reduce(into:)
. (#240) - Added a HTTP server handler that can send 400 errors on HTTP parser errors. (#268)
- Renamed
HTTPHeaders.getCanonicalForm
toHTTPHeaders[canonicalForm:]
, deprecated the old interface. (#293) - Made several
ByteBuffer
generic methods inlinable. (#266) - Implemented lazy HTTP header parsing. Users, please note that this may change the casing of your HTTP headers. (#291)
Semver Patch
- Changed graceful event loop shutdown to properly wait for channel shutdown. (#231)
- Removed needless availability check restricting use on older macOS platforms. (#233)
- Reduced locking overhead in the
EventLoop
. (#235) - Removed overhead in
SocketChannel
,ServerSocketChannel
,DatagramChannel
, andPendingDatagramWriteManager
relating to the removedflush
promises. (#234) - Removed unnecessary promise allocation in
Selector.closeGently
. (#237) - Cleaned up ordering in
EmbeddedChannel
connect and close with respect to promises andchannelActive
/channelInactive
. (#241) - Improved
PriorityQueue
andHeap
performance by bringing them into theNIO
module. (#245) - Reduced the duplication of results in
getaddrinfo
lookups. (#221) - Reduced storage overhead of
ChannelHandlerContext
. (#247) - Avoided re-arming
timerfd
on Linux when doing so was not necessary. (#264) - Improved performance of allocation operations in
ByteBuffer
. (#267) - Improved performance and reduced allocation in
HTTPDecoder
. (#275) - Added WebSocket documentation. (#276)
- Enhanced
HTTPDecoder
to reject HTTP 0.9 and any misleading HTTP/1.1-style protocol that claims a HTTP/2 or higher version. (#283) - Fixed some TSAN issues.
- Reduced the number of
read
calls in most cases. (#296) - Improved the performance of outbound channel operations. (#297)
- Cleaned up typos and other code. (#230, #236, #259, #273)
SwiftNIO 1.3.1
Semver Patch
- Fixed build issues on Swift 4.1 snapshots. (#229)
SwiftNIO 1.3.0
Semver Minor
- Gave
HTTPResponseStatus
a public initializer that can take a numerical status code and optional reason phrase and create an appropriateenum
member, instead of forcing users to use.custom
. (#158) - Added
EventLoopFuture.hopTo(eventLoop:)
to simplify code that needs to ensure callbacks dispatch to a specific thread. (#177)
Semver Patch
- Suppressed compiler warnings that were emitted in release mode. (#179)
- Fixed compilation on iOS. (#180)
- Fixed possible infinite loop when shutting down event loops. (#188)
- Brought
EmbeddedEventLoop
's task scheduling behaviour closer to that ofMultiThreadedEventLoop
. (#189) - Fixed ordering issues between promises and
fire*
methods. (#181) - Fixed failure to expose backwards-compatibility shim for HTTP header iterator type. (#194)
- Reduced memory allocation during task dispatch on
MultiThreadedEventLoopGroup
. (#192) - Fixed ordering issues where
fireChannelRead
could dispatch beforefireChannelActive
. (#195, #204) - Fixed issue where Happy Eyeballs connection state machine would
fatalError
under high load. (#191) - Correctly fail the futures returned from
Channel.getOption
andchannel.setOption
when the channel is closed. (#198) - Improved error message when a non-synchronous
connect
fails. (#203) - Correctly make the channel active when
connect
succeeds synchronously. (#205) - Better diagnostic logging when leaking an
EventLoopPromise
allocated fromChannelOutboundInvoker
. (#208) - Don't crash when a selectable is unregistered from a selector while there are pending select events for that selectable. (#210)
- Don't retry
close
when the syscall returns withEINTR
. (#217) - Work around performance penalty from SR7242. (#223)
- Prevent users getting access to or removing
HeadChannelHandler
andTailChannelHandler
. (#225) - Correctly fail
EventLoopPromise
for writes onServerSocketChannel
instead of crashing. (#226) - Miscellaneous documentation and code style improvements (#207, #212, #219, #197, #142, #193, #87, #190, #183)