-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release/5.0-rc2] Implement SocketsHttpHandler.ConnectCallback (#42075)
* Implement SocketsHttpHandler.ConnectCallback
- Loading branch information
1 parent
e3a1128
commit bb1257b
Showing
11 changed files
with
344 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 0 additions & 106 deletions
106
...raries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsConnectionFactory.cs
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
...es/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/SocketsHttpConnectionContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace System.Net.Http | ||
{ | ||
/// <summary> | ||
/// Represents the context passed to the ConnectCallback for a SocketsHttpHandler instance. | ||
/// </summary> | ||
public sealed class SocketsHttpConnectionContext | ||
{ | ||
private readonly DnsEndPoint _dnsEndPoint; | ||
private readonly HttpRequestMessage _requestMessage; | ||
|
||
internal SocketsHttpConnectionContext(DnsEndPoint dnsEndPoint, HttpRequestMessage requestMessage) | ||
{ | ||
_dnsEndPoint = dnsEndPoint; | ||
_requestMessage = requestMessage; | ||
} | ||
|
||
/// <summary> | ||
/// The DnsEndPoint to be used by the ConnectCallback to establish the connection. | ||
/// </summary> | ||
public DnsEndPoint DnsEndPoint => _dnsEndPoint; | ||
|
||
/// <summary> | ||
/// The initial HttpRequestMessage that is causing the connection to be created. | ||
/// </summary> | ||
public HttpRequestMessage RequestMessage => _requestMessage; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.