Add Id to ConnectionInfo (#828)
This commit is contained in:
parent
412e4de2a5
commit
f5107596a5
|
|
@ -10,6 +10,11 @@ namespace Microsoft.AspNetCore.Http
|
|||
{
|
||||
public abstract class ConnectionInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets a unique identifier to represent this connection.
|
||||
/// </summary>
|
||||
public abstract string Id { get; set; }
|
||||
|
||||
public abstract IPAddress RemoteIpAddress { get; set; }
|
||||
|
||||
public abstract int RemotePort { get; set; }
|
||||
|
|
@ -22,4 +27,4 @@ namespace Microsoft.AspNetCore.Http
|
|||
|
||||
public abstract Task<X509Certificate2> GetClientCertificateAsync(CancellationToken cancellationToken = new CancellationToken());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,13 @@ namespace Microsoft.AspNetCore.Http.Internal
|
|||
private ITlsConnectionFeature TlsConnectionFeature=>
|
||||
_features.Fetch(ref _features.Cache.TlsConnection, _newTlsConnectionFeature);
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Id
|
||||
{
|
||||
get { return HttpConnectionFeature.ConnectionId; }
|
||||
set { HttpConnectionFeature.ConnectionId = value; }
|
||||
}
|
||||
|
||||
public override IPAddress RemoteIpAddress
|
||||
{
|
||||
get { return HttpConnectionFeature.RemoteIpAddress; }
|
||||
|
|
@ -80,4 +87,4 @@ namespace Microsoft.AspNetCore.Http.Internal
|
|||
public ITlsConnectionFeature TlsConnection;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue