-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Added IConnectionSocketFeature for exposing underlying Socket! #30803
Added IConnectionSocketFeature for exposing underlying Socket! #30803
Conversation
Am yet to write tests, but am not able to find a file where it should be written! Waiting for some help on the same! |
This reverts commit 8e73961.
src/Servers/Connections.Abstractions/src/BaseConnectionContext.cs
Outdated
Show resolved
Hide resolved
src/Servers/Connections.Abstractions/src/DefaultConnectionContext.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/shared/TransportConnection.FeatureCollection.cs
Outdated
Show resolved
Hide resolved
src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketConnection.cs
Outdated
Show resolved
Hide resolved
Generated TransportConnection file using CodeGenerator
src/Servers/Kestrel/shared/TransportConnection.FeatureCollection.cs
Outdated
Show resolved
Hide resolved
Added virutal socket again to SocketConnection.cs
Added virtual socket again to SocketConnection.cs
…eyas/aspnetcore into connection-socket-feature
Should I merge the following two lines into one line? aspnetcore/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketConnection.cs Line 47 in ea59c5b
aspnetcore/src/Servers/Kestrel/Transport.Sockets/src/Internal/SocketConnection.cs Line 51 in ea59c5b
|
src/Servers/Connections.Abstractions/src/Features/IConnectionSocketFeature.cs
Outdated
Show resolved
Hide resolved
src/Servers/Connections.Abstractions/src/Features/IConnectionSocketFeature.cs
Outdated
Show resolved
Hide resolved
There aren't any Socket-transport-specific functional tests yet since all functional tests live in the shared https://github.com/dotnet/aspnetcore/tree/main/src/Servers/Kestrel/test/FunctionalTests directory so they can be run against both the Socket and libuv transports. A shared test won't work for this since it relies on the connection having an underlying I think copying ConnectionClosedTokenFiresOnServerAbort into a new test class in https://github.com/dotnet/aspnetcore/tree/main/src/Servers/Kestrel/test/Sockets.FunctionalTests, but using |
src/Servers/Kestrel/tools/CodeGenerator/TransportConnectionFeatureCollection.cs
Show resolved
Hide resolved
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
@MCCshreyas do you need anything to help finish this? |
Hi, @davidfowl I have put this comment! Can you please check what needs to be done! @halter73 asked to remove virtual, but then I am not able to override it derive class! |
Only that thing is remaining from my point of view! |
I responded to the comment about the virtual. We should add a test before merging, but I can take it from here since there's no similar test to really use as an example. While I'm at it, I'll clean up the shared code generation and get this though API review before merging. Thanks for the PR! |
Hi @halter73 sorry for later response. I will get that comment addressed. Last time I tried to follow your instructions about tests, but last time the code wasn't compiling because of that virtual error. If possible I will write test as well with upcoming commit. |
There are some recent changes made in |
Thanks for your hard work @MCCshreyas! There are a few changes we need to make here since we decided to make the Socket field non-nullable. I'd like to take over to make some changes to the code generator. |
Closed in favor of #31588. Kept your commits so you get credit! I'll likely squash them though. |
As part of #28401