Skip to content
This repository was archived by the owner on Mar 19, 2019. It is now read-only.

Add IHttpConnectionFeature.ConnectionId. #178

Merged
merged 1 commit into from
Feb 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/Microsoft.AspNetCore.Server.WebListener/FeatureContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// permissions and limitations under the License.

using System;
using System.Globalization;
using System.IO;
using System.Net;
using System.Net.WebSockets;
Expand Down Expand Up @@ -65,6 +66,7 @@ internal class FeatureContext :
private IPAddress _localIpAddress;
private int? _remotePort;
private int? _localPort;
private string _connectionId;
private string _requestId;
private X509Certificate2 _clientCert;
private ClaimsPrincipal _user;
Expand Down Expand Up @@ -270,6 +272,19 @@ int IHttpConnectionFeature.RemotePort
set { _remotePort = value; }
}

string IHttpConnectionFeature.ConnectionId
{
get
{
if (_connectionId == null)
{
_connectionId = Request.ConnectionId.ToString(CultureInfo.InvariantCulture);
}
return _connectionId;
}
set { _connectionId = value; }
}

X509Certificate2 ITlsConnectionFeature.ClientCertificate
{
get
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Net.Http.Server/RequestProcessing/Request.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ internal SslStatus SslStatus
}
}

internal ulong ConnectionId
public ulong ConnectionId
{
get
{
Expand Down