-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Net.Sockets
Milestone
Description
This proposal adds APIs needed to implement RFC 8305 "Happy Eyeballs" in Socket.ConnectAsync. This depends on #939.
The simplified description of Happy Eyeballs is that it makes A and AAAA DNS requests in parallel, and then goes back and forth between A and AAAA beginning parallel Connect() at a set interval until it has a connection. This trades more overhead for improved latency of the root ConnectAsync call.
See #26177 (comment) where we decided to explore this as a general Socket feature rather than only SocketsHttpClient.
(API has cancellation support added where there previously hasn't been, to avoid needing to add yet more APIs later. See related #921)
class System.Net.Sockets.Socket
{
public static bool ConnectAsync (SocketType socketType, ProtocolType protocolType, SocketAsyncEventArgs e, ConnectAlgorithm connectAlgorithm);
}
enum System.Net.Sockets.ConnectAlgorithm
{
// use existing behavior.
Default,
// use a Happy Eyeballs-like algorithm to connect.
Parallel = 1
}#26177 would be implemented using this, but is not blocked by it.
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Net.Sockets