Releases: apple/swift-nio
Releases · apple/swift-nio
SwiftNIO 1.7.1
Semver Patch
- Fixed an issue where the bootstraps may not correctly invoke the channel initialisers on the event loop for the channel being initialised, causing substantial overhead when configuring the channel. (#424)
- Fixed issues where
Channelobjects and their associated sockets created by the bootstraps may be leaked if channel registration failed for any reason. (#413) - Fixed issues where the
Channelmay be deallocated before theChannelPipelineis cleaned up, causing crashes. (#415) - Fixed an issue where
writepromises were satisfied too early onEmbeddedChannelobjects. (#421) - Fixed an issue where the
WebSocketFrameDecoderwould write a connection close frame but not flush it when a protocol error was encountered. (#421) - Worked around a compiler crash with type aliases in 4.2 snapshots. (#420)
- Testing and documentation improvements. (#416, #419, #423, #425)
SwiftNIO 1.7.0
Semver Minor
- Added
ChannelCore.removeHandlersto help implementers building custom channels do correct channel shutdown. (#408) - Added initial support for sending quiescing signals to
Channels, and support for these signals toAcceptHandlerandHTTPServerPipelineHandler. (#399) - Added executable product
NIOPerformanceTesterto run standardised NIO performance tests. (#396) - Made
EventLoopFuture.hopTo(eventLoop:)public: while it was introduced in 1.3.0 it was accidentally leftinternal.
Semver Patch
- Improved the resilience of
ByteToMessageDecoderagainst re-entrant calls todecode. (#370) - Improved performance of writing
Sequences toByteBufferobjects in cases where the standard library has fast-path access. (#391, #392) - Fixed an issue where we could accidentally corrupt headers or URIs when parsing HTTP/1 messages due to re-entrant calls to
decode. (#385) - Enhanced
SocketChannelobjects to register themselves with theSelectorlazily, allowing them to more easily be used without needing to handle their registration and binding/connection very carefully. (#388) - Removed some warnings when compiling in Swift 4.2 mode. (#407)
- Removed a
Stringallocation when readingConnectionheaders to determine keep-alive state for HTTP/1. (#402) - Attempted to use
http_parser's detected keep-alive status as much as possible in server applications, reducing the computation overhead of checking keep-alive status in most cases. (#299) - Removed some reliance on implicit importing of header files on Linux. (#400)
- Fixed minor invalid pointer type assumption. (#397)
- Fixed broken 32-bit support. (#383)
- Miscellaneous tooling and code quality improvements. (#390, #394, #398, #403)
SwiftNIO 1.6.1
SwiftNIO 1.6.0
Semver Minor
- Added new
UnsafeEmbeddedAtomictype. (#373) - Added
prepend,removeLast, andlasttoCircularBuffer. (#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.discardReadBytesno longer triggers a memory copy if the buffer was fully consumed. (#363)- Improved the ability of the compiler to specialise
ByteBuffercopies of contiguous data types. (#360) - Worked around an optimiser bug that caused unnecessary heap allocations when writing
StaticStringobjects intoByteBuffers. (#354) - Added dtrace scripts for debugging memory allocations. (#352)
- Greatly reduced the overhead of passing
HTTPRequestHeadandHTTPResponseHeadaround theChannelPipelineby placing them into a CoW heap-allocated box. (#351) - Shrunk the size of
ByteBufferandFileRegionto 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
HTTPServerPipelineHandlerwould incorrectly deliver message parts out of order. (#348) - Fixed a bug where
Channel.localAddressandChannel.remoteAddresswould benilduringchannelInactiveandhandlerRemovedcallbacks. (#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
HTTPServerProtocolErrorHandlerandHTTPServerPipelineHandlerto interact better together.HTTPServerPipelineHandlernow also buffers protocol errors, preventing theChannelPipelinefrom seeing those errors until the correct sequence point.HTTPServerProtocolErrorHandlernow avoids emitting 400 errors if a partial response is already in flight. (#314) - Enhanced
WebSocketUpgraderto allow overriding the default maximum websocket frame size. (#315) - Made
IdleStateHandler.IdleStateEventpublic: it had accidentally been made internal. (#319) - Enhanced the
ChannelCoreprotocol withunwrapData, allowing externalChannelCoreimplementers to unwrapNIOAnywrappers. (#321) - Enhanced
BlockingIOThreadPoolwith arunWithActivemethod that automatically fails submitted tasks if the pool has been shut down. (#256) - Enhanced
NonBlockingFileIOstruct with a non-blockingopenFilemethod, allowing users to avoid making blockingopensyscalls. (#256) - Made
HTTPResponseHeadandHTTPRequestHeadmutable. (#324) - Enhanced all NIO core channels with support for registering already-active sockets (that is, sockets that have had
connect,listen, orbindcalled 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
ServerBootstrapandDatagramBootstrapwith awithBoundSocket(descriptor:)method that can take an already-bound socket and use it as the basis for a channel. (#285) - Enhanced the
ClientBootstrapwith 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
ByteBuffers. (#316) - Improved error handling when
connectfails 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.reduceandEventLoopFuture.reduce(into:). (#240) - Added a HTTP server handler that can send 400 errors on HTTP parser errors. (#268)
- Renamed
HTTPHeaders.getCanonicalFormtoHTTPHeaders[canonicalForm:], deprecated the old interface. (#293) - Made several
ByteBuffergeneric 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, andPendingDatagramWriteManagerrelating to the removedflushpromises. (#234) - Removed unnecessary promise allocation in
Selector.closeGently. (#237) - Cleaned up ordering in
EmbeddedChannelconnect and close with respect to promises andchannelActive/channelInactive. (#241) - Improved
PriorityQueueandHeapperformance by bringing them into theNIOmodule. (#245) - Reduced the duplication of results in
getaddrinfolookups. (#221) - Reduced storage overhead of
ChannelHandlerContext. (#247) - Avoided re-arming
timerfdon 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
HTTPDecoderto 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
readcalls 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)