* [0.7.2] Start threads as background in HashedWheelTimer, LoopExecutor, ThreadDeathWatcher
* + code formatting
* [0.7.3] Target net5 and net6 (#2)
target net5 and net6
Adopted TlsHandler for the case when Handshake completion callback is dispatched asynchronously to thread pool
Introduced SingleThreadedEmbededChannel for TlsHandler and SniHandler tests
* + Update DotNetVersion to "6.0.302" in build.ps1
1. Microsoft.Extensions.Configuration from 1.1.0 to 1.1.1
2. Microsoft.Extensions.Logging from 1.1.0 to 1.1.1
3. Google.Protobuf from 3.1.0 to 3.2.0
4. Microsoft.NET.Test.Sdk from 15.0.0 preview to 15.0.0
5. XUnit to 2.2.0 release
6. Moq from alpha to 4.7.1
7. NBench from 0.3.4 to 1.0.0
Motivation:
DotNetty is already working under .NET Core and full .NET Framework but support for other platforms (like UWP) is missing. It is important to have reach in that space as well.
Modifications:
- Thread-based functionality is modeled with Tasks (as threads are not part of supported .NET Standard 1.3).
- IPlatform / DefaultPlatform are added to abstract platform-dependent functionality not available across the board.
- UWP platform implementation is demonstrated in an example along StreamSocket-based Channel.
Result:
UWP support for DotNetty is easy to implement now. Basics for platform-dependent code are added making further development easier.
Motivation:
Ported/Re-implemented DatagramChannel/UDP into DotNetty
Modifications:
- Added DatagramChannel/Config into transport project.
- Added DatagramPacket/DefaultAddressedEnvelop/IAddressedEnvelop into transport project.
- Added DatagramPacketEncoder/DatagramPacketDecoder into Codec project.
- Extra: Ported QuoteOfTheMoment UDP example project.
Result:
DatagramChannel/UDP transport is supported by DotNetty.
Motivation
.NET Core tooling allows building for both .NET Framework and .NET Standard while easing pains of running tests and packaging.
Modifications
- csproj -> xproj + project.json
- support for .NET Standard 1.3
- build script is now based on CAKE
- using dotnet CLI for building, testing, packing
- strong name by default (snk included)
Result
DotNetty works on .NET Core and any other platform supporting .NET Standard 1.3+.
Motivation:
TlsHandler
Fix TlsHandler, optimize encryption / decryption wrt Write vs Flush semantics, optimize memory retention for sparse communication, adopt IByteBuffer.GetIoBuffers() in TlsHandler.
Modifications:
- TlsHandler is rewritten to use batch->copy->write approach instead of writing directly to SslStream in order to reduce overhead of framing / writing out everything separately.
- TlsHandler uses IByteBuffer.GetIoBuffers intead of direct array access increasing compatibility for non-array-backed buffers.
- TlsHandler and TlsHandler.MediationStream use Task semantics now when reading through SslStream.
- Extra: upgraded to NBench 2.2, xUnit 2.1.0.
- Extra: better portability for .NET Core support.
Result:
TlsHandler provides better framing and much better (x2+) performance (depends on application control of flushing).
TlsHandler operates properly in edge cases when more than one frame is accepted at once and if decrypted frame size is more than 4 KB.
TlsHandler holds only 256 byte buffer while waiting for more data to arrive off the wire.
Extra: DotNetty is almost .NET Core compatible.
Motivation:
Existing rudimentary buffer pool implementation is not flexible to efficiently support scenarios with high variety in message sizes.
Modifications:
- implemented PooledByteBufferAllocator (port of PooledByteBufAllocator) and related artifacts
- made IByteBuffer implement IEquatable<IByteBuffer>, IComparable<IByteBuffer>, implemented Equals, GetHashCode.
- ported test suite for Byte Buffers and fixed discovered issues.
- added suppression of ExecutionContext flow on async read / write on socket-based channels.
- removed old pooled Byte Buffer allocator implementation.
Result:
Support for buffer pooling for larger byte sequences, more efficient usage of memory dedicated for the pool.
Motivation
Since signed assemblies became part of the release they slowed down release cycle due to extended effort necessary to prepare nuget packages with signed assemblies.
Modifications
- introduced "Signed" solution configuration
- optional Test Friends (turned off in Signed)
- re-signing support in build script
Result
New releases can be produced quicker with less effort.
Motivation:
At the present moment documentation of DotNetty is almost non-existent.
Moreover there are no examples that can be used as starting point for the
library learning. This commit is mean to provide basic client-server echo example over secure pipeline.
Modification:
- Created an examples directory to be used in the future for possible
examples projects.
- Added two console projects used to establish server-client connection
with basic secure DotNetty echo pipeline.
Result:
New console projects have been created under /examples directory.
- currentPacket and remainingLength are passed through method parameters
- RequestReplay calls are based on buffer.ReadableBytes(remainingLength)
- streamlined states and method division to reflect actual packet parsing logic
Implemented the following classes:
- LengthFieldBaseFrameDecoder
- TooLongFrameException
- CorruptedFrameException
Added the following projects:
- DotNetty.Codecs.Tests