Add IHttpConnectionFeature.ConnectionId.

This commit is contained in:
Chris R 2016-02-11 14:22:53 -08:00
parent 8007020bff
commit 5061848e9e
2 changed files with 16 additions and 1 deletions

View File

@ -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;
@ -65,6 +66,7 @@ namespace Microsoft.AspNetCore.Server.WebListener
private IPAddress _localIpAddress;
private int? _remotePort;
private int? _localPort;
private string _connectionId;
private string _requestId;
private X509Certificate2 _clientCert;
private ClaimsPrincipal _user;
@ -270,6 +272,19 @@ namespace Microsoft.AspNetCore.Server.WebListener
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

View File

@ -160,7 +160,7 @@ namespace Microsoft.Net.Http.Server
}
}
internal ulong ConnectionId
public ulong ConnectionId
{
get
{