-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.Net
Milestone
Description
UPDATE: Scoped to WebSocket only as there is no way to achieve that.
HttpClient has a way and HttpWebRequest is legacy API (so no need).
I find the sulution for httpclient from issues like this.
var handler = new SocketsHttpHandler{
ConnectCallback = async (context,token)=>{
// dns get ipv6 and connect
return ipv6stream
}
};
var client = new HttpClient(handler);// HttpClientHandle???but it can useful for httpclient only,and it replaced httpclienthandle,will lost the diagnosticsHandler yet.
and I view the httpwebrequest and websocket source code, the SocketsHttpHandler is a private member of them only,and i can't get the ConnectCallback for using.
so how can i force ipv6 or ipv4 on httpwebrequest, websocket and httpclient(with diagnosticsHandler )
MineCake147E
Metadata
Metadata
Assignees
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationarea-System.Net