-
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
Expose Socket via a Kestrel ConnectionContext feature #28401
Comments
Thanks for contacting us. |
What are examples of usage for this? What settings do you want after creation of the socket? |
Force a reset. |
Another use case that came up last week was the ability to get tcp information via a new ioctl |
Proposed APIusing System.Net.Sockets;
namespace Microsoft.AspNetCore.Connections.Features
{
+ public interface IConnectionSocketFeature
+ {
+ Socket Socket { get; }
+ }
} Usage Examplesvar socket = connectionContext.Features.Get<IConnectionSocketFeature>()?.Socket;
if (socket is not null) |
Is your feature request related to a problem? Please describe.
We should make it so you don't have to resort to something like the following to access the managed Socket if you really want to.
Proposed API
Usage Examples
The text was updated successfully, but these errors were encountered: