aspnetcore
aspnetcore copied to clipboard
Add transport selector interface to Kestrel sockets and QUIC transports
Follow up PR to address comment https://github.com/dotnet/aspnetcore/pull/44657#discussion_r1010869733
Note:
An edge case with SocketTransportFactory
is it allows the factory method to be customized with SocketTransportOptions.CreateBoundListenSocket.
A custom method creating the socket means potentially any endpoint could work. Inside user code, a custom EndPoint
implementation could be changed to an endpoint type supported by sockets. Limiting the endpoints that can be used to only built-in types would be a breaking change because the custom endpoint type would no longer work.
Does anyone do this? Probably not. If someone is using a custom endpoint type to pass in custom values to the factory method, a workaround to this change is to inherit from one of the supported endpoint types, e.g. IPEndPoint
, and add new members..
Is it worth calling out this change? I can create a breaking change issue for this situation after .NET 7 ships.
@Tratcher @halter73 Any more feedback on this PR? I'd like to merge it 🙏
The changed test error in this PR shows it works.