-
Notifications
You must be signed in to change notification settings - Fork 5.4k
[QUIC] Adopted msquic generated interop #68288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 12 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
c6edafb
MsQuicApi adjusted
ManickaP ea31c49
QuicParamHelper adjusted
ManickaP 8d41cbb
MsQuicConfiguration adjusted
ManickaP 55dc554
Added MsQuicException
ManickaP 259545e
MsQuicConnection adjusted
ManickaP d0fb04e
MsQuicListener adjusted
ManickaP b3d76cf
MsQuicStream adjusted
ManickaP 103cd1f
It compiles!
ManickaP 08b5b47
Some test fixes
ManickaP 7794b58
Fixed stream read event handling
ManickaP 46a7401
Re-enabled IPv6 tests
ManickaP 182a8f0
latest greatest
ManickaP 2b0172c
Update src/libraries/System.Net.Quic/src/System/Net/Quic/Implementati…
ManickaP 3162353
MsQuic interop enum names
ManickaP 88a5d89
Merge branch 'main' into mapichov/quic_interop
ManickaP 166fa96
3rd Party notice, version check
ManickaP de307c3
SafeHandleType
ManickaP c955a4f
Replaced AlpnHelpers with MsQuicBuffers generic QUIC_BUFFER* helper
ManickaP 6186a23
Sealed exception class
ManickaP f64b1d1
Feedback MsQuicBuffers
ManickaP 43c6417
NativeMemory use
ManickaP 059c3d4
Merge branch 'main' into mapichov/quic_interop
ManickaP cd3b00d
Newest msquic interop
ManickaP c6e0d6c
Buffers feedback
ManickaP de15868
Remove MemoryHandle pooling
ManickaP a73cfa8
Buffers feedback
ManickaP d52fcdb
Logging feedback
ManickaP cf2377c
Merge branch 'main' into mapichov/quic_interop
ManickaP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
src/libraries/Common/tests/TestUtilities/TestEventListener.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| using System.Collections.Generic; | ||
| using System.Diagnostics.Tracing; | ||
| using System.Text; | ||
| using Xunit.Abstractions; | ||
|
|
||
| namespace TestUtilities; | ||
|
|
||
| /// <summary> | ||
| /// Logging helper for tests. | ||
| /// Logs event source events into test output. | ||
| /// </summary> | ||
| public sealed class TestEventListener : EventListener | ||
| { | ||
| private readonly ITestOutputHelper _output; | ||
| private readonly HashSet<string> _sourceNames; | ||
|
|
||
| // Until https://github.com/dotnet/runtime/issues/63979 is solved. | ||
| private List<EventSource> _eventSources = new List<EventSource>(); | ||
|
|
||
| public TestEventListener(ITestOutputHelper output, params string[] sourceNames) | ||
| { | ||
| _output = output; | ||
| _sourceNames = new HashSet<string>(sourceNames); | ||
| foreach (var eventSource in _eventSources) | ||
| { | ||
| OnEventSourceCreated(eventSource); | ||
| } | ||
| _eventSources = null; | ||
| } | ||
|
|
||
| protected override void OnEventSourceCreated(EventSource eventSource) | ||
| { | ||
| // We're called from base ctor, just save the event source for later initialization. | ||
| if (_sourceNames is null) | ||
| { | ||
| _eventSources.Add(eventSource); | ||
| return; | ||
| } | ||
|
|
||
| // Second pass called from our ctor, allow logging for specified source names. | ||
| if (_sourceNames.Contains(eventSource.Name)) | ||
| { | ||
| EnableEvents(eventSource, EventLevel.LogAlways); | ||
| } | ||
| } | ||
|
|
||
| protected override void OnEventWritten(EventWrittenEventArgs eventData) | ||
| { | ||
| var sb = new StringBuilder().Append($"{eventData.TimeStamp:HH:mm:ss.fffffff}[{eventData.EventName}] "); | ||
| for (int i = 0; i < eventData.Payload?.Count; i++) | ||
| { | ||
| if (i > 0) | ||
| sb.Append(", "); | ||
| sb.Append(eventData.PayloadNames?[i]).Append(": ").Append(eventData.Payload[i]); | ||
| } | ||
| try | ||
| { | ||
| _output.WriteLine(sb.ToString()); | ||
| } | ||
| catch { } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
...stem.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/Internal/MsQuicAddressHelpers.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.