Add IHttpConnectionFeature.ConnectionId.
This commit is contained in:
parent
8007020bff
commit
5061848e9e
|
|
@ -16,6 +16,7 @@
|
||||||
// permissions and limitations under the License.
|
// permissions and limitations under the License.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.WebSockets;
|
using System.Net.WebSockets;
|
||||||
|
|
@ -65,6 +66,7 @@ namespace Microsoft.AspNetCore.Server.WebListener
|
||||||
private IPAddress _localIpAddress;
|
private IPAddress _localIpAddress;
|
||||||
private int? _remotePort;
|
private int? _remotePort;
|
||||||
private int? _localPort;
|
private int? _localPort;
|
||||||
|
private string _connectionId;
|
||||||
private string _requestId;
|
private string _requestId;
|
||||||
private X509Certificate2 _clientCert;
|
private X509Certificate2 _clientCert;
|
||||||
private ClaimsPrincipal _user;
|
private ClaimsPrincipal _user;
|
||||||
|
|
@ -270,6 +272,19 @@ namespace Microsoft.AspNetCore.Server.WebListener
|
||||||
set { _remotePort = value; }
|
set { _remotePort = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string IHttpConnectionFeature.ConnectionId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_connectionId == null)
|
||||||
|
{
|
||||||
|
_connectionId = Request.ConnectionId.ToString(CultureInfo.InvariantCulture);
|
||||||
|
}
|
||||||
|
return _connectionId;
|
||||||
|
}
|
||||||
|
set { _connectionId = value; }
|
||||||
|
}
|
||||||
|
|
||||||
X509Certificate2 ITlsConnectionFeature.ClientCertificate
|
X509Certificate2 ITlsConnectionFeature.ClientCertificate
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ namespace Microsoft.Net.Http.Server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal ulong ConnectionId
|
public ulong ConnectionId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue