67 references to Port
Aspire.Dashboard (2)
Configuration\ResolvedEndpointInfo.cs (2)
19return BindingAddress.Scheme.ToLowerInvariant() + Uri.SchemeDelimiter + BindingAddress.Host.ToLowerInvariant() + ":" + EndPoint.Port.ToString(CultureInfo.InvariantCulture); 26return BindingAddress.Scheme.ToLowerInvariant() + Uri.SchemeDelimiter + "localhost:" + EndPoint.Port.ToString(CultureInfo.InvariantCulture);
Aspire.Dashboard.Tests (9)
Integration\ServerRetryHelper.cs (2)
126var match = unavailableEndpoints.FirstOrDefault(ep => ep.Port == port); 153if (endpoint.Port >= startingPort)
Integration\StartupTests.cs (7)
329Assert.Equal(app.FrontendSingleEndPointAccessor().EndPoint.Port, app.OtlpServiceGrpcEndPointAccessor().EndPoint.Port); 385Assert.Equal(app.FrontendSingleEndPointAccessor().EndPoint.Port, app.OtlpServiceGrpcEndPointAccessor().EndPoint.Port); 516Assert.Equal(app.FrontendSingleEndPointAccessor().EndPoint.Port, app.OtlpServiceHttpEndPointAccessor().EndPoint.Port); 1142Assert.NotEqual(0, ipEndPoint.Port);
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Implementation\RedisProfilerEntryToActivityConverter.cs (1)
144activity.SetTag(SemanticConventions.AttributeNetPeerPort, ipEndPoint.Port);
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrSocketConnection.cs (2)
566string remoteEndpointAddressString = remoteEndpoint.Address + ":" + remoteEndpoint.Port; 613remoteEndpointAddressString = remote.Address + ":" + remote.Port;
Microsoft.AspNetCore.Http.Connections (1)
src\aspnetcore\src\Shared\ConnectionEndpointTags.cs (1)
60tags.Add("server.port", localIPEndPoint.Port);
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
324connection.RemotePort = currentValues.RemoteIpAndPort.Port;
Microsoft.AspNetCore.Server.Kestrel.Core (10)
AnyIPListenOptions.cs (4)
34context.Logger.LogTrace(ex, CoreStrings.FailedToBindToIPv6Any, IPEndPoint.Port); 38context.Logger.LogDebug(CoreStrings.FallbackToIPv4Any, IPEndPoint.Port, IPEndPoint.Port); 42EndPoint = new IPEndPoint(IPAddress.Any, IPEndPoint.Port);
Internal\Http\HttpProtocol.cs (2)
397RemotePort = remoteEndPoint?.Port ?? 0; 400LocalPort = localEndPoint?.Port ?? 0;
Internal\Infrastructure\HttpUtilities.cs (1)
613var text = "h3=\":" + endpoint.Port.ToString(CultureInfo.InvariantCulture) + "\"; ma=86400";
ListenOptions.cs (1)
236var options = new ListenOptions(new IPEndPoint(address, IPEndPoint!.Port))
LocalhostListenOptions.cs (1)
35return $"{Scheme}://{host}:{IPEndPoint!.Port}";
src\aspnetcore\src\Shared\ConnectionEndpointTags.cs (1)
60tags.Add("server.port", localIPEndPoint.Port);
Microsoft.AspNetCore.SignalR.Core (1)
src\aspnetcore\src\Shared\ConnectionEndpointTags.cs (1)
60tags.Add("server.port", localIPEndPoint.Port);
Microsoft.Diagnostics.NETCore.Client (1)
DiagnosticsServerRouter\DiagnosticsServerRouterFactory.cs (1)
336_tcpServerAddress = _tcpServerAddress.Replace(":0", string.Format(":{0}", ipEP.Port));
Microsoft.DotNet.HotReload.Watch (2)
src\sdk\src\Dotnet.Watch\AspireService\Helpers\SocketUtilities.cs (2)
68if (endPointUsed is not null && !s_unsafePorts.Contains(endPointUsed.Port)) 70ports[i] = endPointUsed.Port;
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
TcpEndpointProbesServiceTests.cs (1)
126int port = ((IPEndPoint)listener.LocalEndpoint).Port;
Microsoft.Extensions.ServiceDiscovery (1)
Http\ResolvingHttpDelegatingHandler.cs (1)
91port = ip.Port;
Microsoft.Extensions.ServiceDiscovery.Abstractions (2)
Internal\ServiceEndpointImpl.cs (2)
17IPEndPoint ip when ip.Port == 0 && ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6 => $"[{ip.Address}]", 18IPEndPoint ip when ip.Port == 0 => $"{ip.Address}",
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Resolver\LoopbackDnsServer.cs (1)
80_tcpSocket.Bind(new IPEndPoint(IPAddress.Loopback, ((IPEndPoint)_dnsSocket.LocalEndPoint!).Port));
Microsoft.Extensions.ServiceDiscovery.Tests (4)
ServiceEndpointResolverTests.cs (4)
119Assert.Equal(8080, ip.Port); 168Assert.Equal(8080, ip.Port); 205Assert.Equal(8080, ip.Port); 289Assert.Equal(8080, ip.Port);
Microsoft.TestPlatform.CommunicationUtilities (5)
DataCollectionRequestSender.cs (1)
61return endpoint.Port;
DataCollectionTestCaseEventHandler.cs (1)
55return endpoint.Port;
SocketClient.cs (1)
61_tcpClient.ConnectAsync(ipEndPoint.Address, ipEndPoint.Port).ContinueWith(OnServerConnected);
SocketCommunicationManager.cs (1)
187await _tcpClient.ConnectAsync(endpoint.Address, endpoint.Port);
TestRequestSender.cs (1)
168return endpoint.GetIpEndPoint().Port;
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (2)
VsTestConsoleRequestSender.cs (2)
93port = _communicationManager.HostServer(new IPEndPoint(IPAddress.Loopback, 0)).Port; 134port = _communicationManager.HostServer(new IPEndPoint(IPAddress.Loopback, 0)).Port;
System.Net.HttpListener (2)
System\Net\Managed\HttpEndPointManager.cs (1)
175p.Remove(ep.Port);
System\Net\Managed\HttpListenerRequest.Managed.cs (1)
168string base_uri = $"{RequestScheme}://{host}:{LocalEndPoint!.Port}";
System.Net.Ping (2)
src\runtime\src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (2)
61SocketAddressPal.SetPort(destination, (ushort)endPoint.Port); 68endPoint.Port == (int)SocketAddressPal.GetPort(socketAddressBuffer))
System.Net.Primitives (5)
src\runtime\src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (2)
61SocketAddressPal.SetPort(destination, (ushort)endPoint.Port); 68endPoint.Port == (int)SocketAddressPal.GetPort(socketAddressBuffer))
System\Net\IPEndPoint.cs (3)
20/// Specifies the minimum acceptable value for the <see cref='System.Net.IPEndPoint.Port'/> property. 25/// Specifies the maximum acceptable value for the <see cref='System.Net.IPEndPoint.Port'/> property. 184public override SocketAddress Serialize() => new SocketAddress(Address, Port);
System.Net.Quic (3)
src\runtime\src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (2)
61SocketAddressPal.SetPort(destination, (ushort)endPoint.Port); 68endPoint.Port == (int)SocketAddressPal.GetPort(socketAddressBuffer))
System\Net\Quic\Internal\MsQuicHelpers.cs (1)
28port = ipEndPoint.Port;
System.Net.Requests (2)
System\Net\FtpControlStream.cs (2)
1128return FormatAddress(localEP.Address, localEP.Port); 1132return FormatAddressV6(localEP.Address, localEP.Port);
System.Net.Sockets (6)
src\runtime\src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (2)
61SocketAddressPal.SetPort(destination, (ushort)endPoint.Port); 68endPoint.Port == (int)SocketAddressPal.GetPort(socketAddressBuffer))
System\Net\Sockets\Socket.cs (1)
3354remoteEP = new IPEndPoint(addr, ip.Port);
System\Net\Sockets\Socket.Tasks.cs (1)
184Debug.Assert(endPoint.Port == port);
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
798Debug.Assert(existing.Port == port);
System\Net\Sockets\SocketsTelemetry.cs (1)
109int port = ipEndPoint.Port;
System.ServiceModel.NetTcp (1)
System\ServiceModel\Channels\SocketConnection.cs (1)
439_remoteEndpointAddress = remote.Address + ":" + remote.Port;