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
|
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 IPAddress RemoteIpAddress { get; set; }
|
||||||
|
|
||||||
public abstract int RemotePort { get; set; }
|
public abstract int RemotePort { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,13 @@ namespace Microsoft.AspNetCore.Http.Internal
|
||||||
private ITlsConnectionFeature TlsConnectionFeature=>
|
private ITlsConnectionFeature TlsConnectionFeature=>
|
||||||
_features.Fetch(ref _features.Cache.TlsConnection, _newTlsConnectionFeature);
|
_features.Fetch(ref _features.Cache.TlsConnection, _newTlsConnectionFeature);
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string Id
|
||||||
|
{
|
||||||
|
get { return HttpConnectionFeature.ConnectionId; }
|
||||||
|
set { HttpConnectionFeature.ConnectionId = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public override IPAddress RemoteIpAddress
|
public override IPAddress RemoteIpAddress
|
||||||
{
|
{
|
||||||
get { return HttpConnectionFeature.RemoteIpAddress; }
|
get { return HttpConnectionFeature.RemoteIpAddress; }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue