You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some hosts cannot establish connection to specific addresses because Ipv6/Ipv4 are not enabled on them or more generally they don't support a specific address family. For example : when trying to establish a quic connection to an ipv6 address on a OS where ipv6 is disabled, we would get the following errors :
Unix : An internal error has occurred. Status code: Unknown (0x63)
Windows : An internal error has occurred. Status code: Unknown (0x80072743)
The goal of this proposal is to return a custom quic error for this case. The new enum would be mapped to :
Unix : EAFNOSUPPORT error
Windows : WSAENETUNREACH error
This proposal is created on behalf of this issue #74053
API Proposal
namespaceSystem.Net.Quic;publicenumQuicError{/// <summary>/// The requested address is not available on this machine/// </summary>AddressNotAvailable,}
API Usage
try{// create quic connection}catch(QuicExceptionex){if(ex.QuicError==QuicError.AddressNotAvailable){Console.WriteLine("The OS does not support this address family ")}}
The two proposed inputs don't seem to both cleanly map to the same error (POSIX has ENETUNREACH which seems a better match to WSAENETUNREACH)
There's already an existing "AddressInUse", which makes it hard for callers to understand why "NotAvailable" is different from "InUse"
If it's (based on the EAFNOSUPPORT) address -family- not available, that should be in the name (e.g. AddressFamilyNotAvailable)
It doesn't feel like there's actually a scenario where someone needs this value (or these values, if it's multiple), making it unclear why we're making essentially a copy of SocketError.
It seems like perhaps a better answer here is to expose the SocketException directly (probably wrapped by QuicException)
namespaceSystem.Net.Quic;publicpartialenumQuicError{/// <summary>/// The requested address family is not available on this machine/// </summary>AddressNotAvailable,}
Reading this again, It feels like we should change this to AddressFamilyNotAvailable, right @pedrobsaila@ManickaP?
E.g. this is not about instance of specific address not working but really more about the type. If we agree I can take it back to API review.
@wfurt I like the option of throwing a SocketException better, I have some ideas about how to redesign the exceptions stuff, but generally it is just moving all the low-level (below-QUIC) errors to SocketException, so that we don't have to duplicate SocketError enum.
Activity
karelz commentedon Oct 4, 2022
Triage: Networking team agrees. @rzikm can you please start email-approval, given it is small? Thanks!
bartonjs commentedon Nov 15, 2022
Video
AddressFamilyNotAvailable)SocketError.SocketExceptiondirectly (probably wrapped by QuicException)wfurt commentedon May 1, 2023
Reading this again, It feels like we should change this to
AddressFamilyNotAvailable, right @pedrobsaila @ManickaP?E.g. this is not about instance of specific address not working but really more about the type. If we agree I can take it back to API review.
rzikm commentedon May 2, 2023
@wfurt I like the option of throwing a SocketException better, I have some ideas about how to redesign the exceptions stuff, but generally it is just moving all the low-level (below-QUIC) errors to SocketException, so that we don't have to duplicate SocketError enum.
wfurt commentedon Jun 30, 2023
we shall throw
SocketException- similar to #87208.Do you want to finish #74053 @pedrobsaila? It should be straight forward once MsQuic taks your change and when we sync up the interop,
pedrobsaila commentedon Jun 30, 2023
I'm on vacation until 9 July. I'll be happy to work on it when I'm back. Meanwhile, you can assign it to someone else if it is urgent.