20 Commits

Author SHA1 Message Date
Johnson Yang 38c7c49a90 fix TLS1.3 connection drops if application data sent before TLS authentication completed 2026-01-08 16:44:09 -08:00
nivalxer 977fd6ac09 Fix the issue of TLS handshake failure in .NET 8 environment.
Signed-off-by: nivalxer <nivalxer@gmail.com>
2023-12-02 03:54:10 +08:00
Andrey Ilnitsky 18fbb0839e Target fix: net5 -> net5.0, net6 -> net6.0 (#592) 2022-08-04 14:53:30 -07:00
Andrey Ilnitsky f754c83069 [0.7.3] Target net5 and net6 (#588)
* [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
2022-08-02 16:37:48 -07:00
Andrey Ilnitsky 1cdaadbfaa - target net472 and netstandard2.0
- microsoft.extensions.logging 5.0.0
- microsoft.extensions.configuration 5.0.0
2021-07-16 18:04:31 -07:00
Max Gortman 6515aa0853 set version to 0.6.0 (#435) 2018-10-10 09:16:51 -07:00
Johnny Z f227f95966 HTTP 1.1 codec #52 (#256) 2018-04-11 09:31:39 -07:00
Johnny Z 2cd04cd8a7 InliningDiagnoser/Unsafe unaligned. (#384) 2018-03-26 09:47:51 -07:00
Johnny Z 33b95cfe61 Buffer read/write/get/set strings. (#369)
Motivation:
Implement commonly used string-based operations (originally Netty CharSequence) for byte buffers.

Modifications:
Added read/write/get/set strings methods to byte buffers.
Also reduced unsafe pin/unpins for byte operations.

Result:
String-based operations are supported in DotNetty
2018-03-15 14:58:49 -07:00
Johnny Z d77bc29389 Unsafe direct buffers. (#316) 2017-12-20 10:41:36 -08:00
Johnny Z 6b86b1b883 Re align with Netty buffers. (#287) 2017-09-15 11:32:11 -07:00
Johnny Z c79a974400 Changed unit test projects to NET452 required by xunit 2.2.0 (#229) 2017-04-05 10:16:33 -07:00
Johnny Z 107a1c87b1 Follow up .NET tooling to upgraded packages to latest stable version
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
2017-03-21 15:03:36 -07:00
Alex Valuyskiy 00d656c533 Downgraded to net45 (#197) 2017-02-22 12:23:29 -08:00
Max Gortman 52d1bf34d1 Migrating to new .Net Core RC tooling (#192) 2017-02-09 02:30:48 -08:00
Max Gortman 4f28a55b48 Move to .NET Core tooling (#170)
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+.
2016-11-07 17:50:24 -08:00
Max Gortman 7aef9c7500 Switch to ConcurrentQueue in STEE by default (#160)
Motivation:
as netty moved on to use JCTools directly, it is worth revisiting standard .NET concurrent collection and open queue type election in executor.

Modifications:
- Removed MpscLinkedQueue as redundant (perf is no better than with ConcurrentQueue)
- Introduced CompatibleConcurrentQueue to bridge ConcurrentQueue and IQueue<T> interface, made it the default.
- Updated STEE execution benchmark

Result:
Cleaner solution, less GC pressure from executor actions, ability to specify specialized task queue type (e.g. MpscArrayQueue on server for efficiency (at a cost of extra-mem consumption).
2016-09-07 16:39:03 -07:00
Max Gortman f31c02e346 Fixes TlsHandler from operation, perf and compat POVs.
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.
2016-06-01 14:09:14 -07:00
Max Gortman 47163fde8d switching to C# 6.0 2016-05-05 01:19:49 -07:00
mgortman 8b59715deb Improved perf of SingleThreadEventExecutor
Motivation:
Impove performance of execution model

Modifications:
- switched SemaphoreSlim for ManualResetEventSlim to track empty vs non-empty states for executor's queue

extras
- removing wait for event loop shutdown (reduces test run time)
- adding benchmarking
- extracted common test utilities into Tests.Common project
- fixing ReSharper settings for ReSharper 10

Results:
5x improvement on in-loop scheduling, 2x improvement on out-of-liio scheduling:
STEE in loop (new)
        624ms   1,406,159Kc (G0= 114, G1=   0, G2=   0)
STEE in loop (old)
      2,719ms   6,205,423Kc (G0= 114, G1=   0, G2=   0)
STEE out of loop (new)
      1,464ms   6,559,838Kc (G0=  95, G1=   0, G2=   0)
STEE out of loop (old)
      3,869ms  12,331,986Kc (G0=  38, G1=  28, G2=   3)
2015-11-09 04:30:42 -08:00