Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/Microsoft.AspNetCore.Http.Abstractions/ConnectionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -22,4 +27,4 @@ public abstract class ConnectionInfo

public abstract Task<X509Certificate2> GetClientCertificateAsync(CancellationToken cancellationToken = new CancellationToken());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ public virtual void Uninitialize()
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; }
Expand Down Expand Up @@ -80,4 +87,4 @@ struct FeatureInterfaces
public ITlsConnectionFeature TlsConnection;
}
}
}
}