2 writes to Address
System.Net.Sockets (2)
System\Net\Sockets\Socket.Tasks.cs (1)
205endPoint.Address = address;
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
766existing.Address = address;
83 references to Address
Aspire.Dashboard.Tests (2)
Integration\StartupTests.cs (2)
720Assert.True(ipEndPoint.Address.Equals(IPAddress.Any) || ipEndPoint.Address.Equals(IPAddress.IPv6Any), "Endpoint address should be IPv4 or IPv6.");
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Implementation\RedisProfilerEntryToActivityConverter.cs (1)
143activity.SetTag(SemanticConventions.AttributeNetPeerIp, ipEndPoint.Address.ToString());
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.Components.WebAssembly.Server (1)
TargetPickerUi.cs (1)
121await browserDebugClientConnect.ConnectAsync(endpoint.Address, 6000);
Microsoft.AspNetCore.HttpOverrides (2)
ForwardedHeadersMiddleware.cs (2)
226if (currentValues.RemoteIpAndPort != null && checkKnownIps && !CheckKnownAddress(currentValues.RemoteIpAndPort.Address)) 323connection.RemoteIpAddress = currentValues.RemoteIpAndPort.Address;
Microsoft.AspNetCore.Server.Kestrel.Core (4)
Internal\Http\HttpProtocol.cs (2)
379RemoteIpAddress = remoteEndPoint?.Address; 382LocalIpAddress = localEndPoint?.Address;
Internal\Infrastructure\KestrelMetrics.cs (2)
327tags.Add("server.address", localIPEndPoint.Address.ToString()); 330switch (localIPEndPoint.Address.AddressFamily)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (12)
AddressBinderTests.cs (6)
31Assert.Equal(IPAddress.Parse(expectedAddress), endpoint.Address); 59Assert.Equal(IPAddress.IPv6Any, listenOptions.IPEndPoint.Address); 70Assert.Equal(IPAddress.Loopback, listenOptions.IPEndPoint.Address); 150Assert.Equal(IPAddress.Parse(ip), listenOptions.IPEndPoint.Address); 267if (endpoint.IPEndPoint.Address.Equals(IPAddress.IPv6Any)) 273if (endpoint.IPEndPoint.Address.Equals(IPAddress.Any))
KestrelServerTests.cs (6)
473Assert.Equal(IPAddress.IPv6Any, ((IPEndPoint)transportEndPoint.OriginalEndPoint).Address); 474Assert.Equal(IPAddress.IPv6Any, ((IPEndPoint)multiplexedTransportEndPoint.OriginalEndPoint).Address); 502Assert.Equal(IPAddress.IPv6Any, ((IPEndPoint)transportEndPoint.OriginalEndPoint).Address); 530Assert.Equal(IPAddress.IPv6Any, ((IPEndPoint)multiplexedTransportEndPoint.OriginalEndPoint).Address); 1000resolvedEndPoint = new IPEndPoint(new IPAddress(ipEndPoint.Address.GetAddressBytes()), port); 1052resolvedEndPoint = new IPEndPoint(new IPAddress(ipEndPoint.Address.GetAddressBytes()), port);
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
SocketTransportOptions.cs (1)
146if (ip.Address.Equals(IPAddress.IPv6Any))
Microsoft.Extensions.ServiceDiscovery (1)
Http\ResolvingHttpDelegatingHandler.cs (1)
90host = ip.Address.ToString();
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.Tests (4)
ServiceEndpointResolverTests.cs (4)
116Assert.Equal(IPAddress.Parse("127.1.1.1"), ip.Address); 165Assert.Equal(IPAddress.Parse("127.1.1.1"), ip.Address); 202Assert.Equal(IPAddress.Parse("127.1.1.1"), ip.Address); 286Assert.Equal(IPAddress.Parse("127.1.1.1"), ip.Address);
Sockets.BindTests (1)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (1)
116if (!CanBindToEndpoint(endpoint.Address, 443))
Sockets.FunctionalTests (1)
SocketTransportTests.cs (1)
41Assert.Equal(ip.Address, context.Connection.RemoteIpAddress);
System.Net.Http (3)
System\Net\Http\HttpTelemetry.cs (1)
105string? remoteAddress = remoteEndPoint?.Address?.ToString();
System\Net\Http\SocketsHttpHandler\ConnectionPool\ConnectionSetupDistributedTracing.cs (1)
51activity.SetTag("network.peer.address", remoteEndPoint.Address.ToString());
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (1)
76remoteEndPoint?.Address?.ToString());
System.Net.HttpListener (4)
System\Net\HttpListenerRequest.cs (2)
111public bool IsLocal => LocalEndPoint!.Address.Equals(RemoteEndPoint!.Address);
System\Net\Managed\HttpEndPointManager.cs (2)
174p = s_ipEndPoints[ep.Address]; 178s_ipEndPoints.Remove(ep.Address);
System.Net.Ping (8)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (4)
60SetIPAddress(destination, endPoint.Address); 73return endPoint.Address.Address == (long)SocketAddressPal.GetIPv4Address(socketAddressBuffer); 81if (endPoint.Address.ScopeId != (long)scopeid) 85endPoint.Address.TryWriteBytes(addressBuffer2, out _);
System\Net\NetworkInformation\Ping.RawSocket.cs (4)
64AddressFamily addrFamily = ep.Address.AddressFamily; 102if (NeedsConnect && !ep.Address.IsIPv6Multicast && !(ipv4 && (ep.Address.Address & 0xf0) == 0xe0)) 245IPAddress address = ((IPEndPoint)socketConfig.EndPoint).Address;
System.Net.Primitives (5)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (4)
60SetIPAddress(destination, endPoint.Address); 73return endPoint.Address.Address == (long)SocketAddressPal.GetIPv4Address(socketAddressBuffer); 81if (endPoint.Address.ScopeId != (long)scopeid) 85endPoint.Address.TryWriteBytes(addressBuffer2, out _);
System\Net\IPEndPoint.cs (1)
152public override SocketAddress Serialize() => new SocketAddress(Address, Port);
System.Net.Quic (6)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (4)
60SetIPAddress(destination, endPoint.Address); 73return endPoint.Address.Address == (long)SocketAddressPal.GetIPv4Address(socketAddressBuffer); 81if (endPoint.Address.ScopeId != (long)scopeid) 85endPoint.Address.TryWriteBytes(addressBuffer2, out _);
System\Net\Quic\Internal\MsQuicHelpers.cs (1)
27address = ipEndPoint.Address;
System\Net\Quic\QuicListener.cs (1)
148if (options.ListenEndPoint.Address.Equals(IPAddress.IPv6Any))
System.Net.Requests (7)
System\Net\FtpControlStream.cs (6)
112if (!connection.ServerAddress.Equals(((IPEndPoint)connection._dataSocket.RemoteEndPoint!).Address)) 706IPEndPoint localEndPoint = new IPEndPoint(((IPEndPoint)Socket.LocalEndPoint!).Address, 0); 745if (!ServerAddress.Equals(((IPEndPoint)_dataSocket.RemoteEndPoint!).Address)) 1102IPEndPoint epListener = new IPEndPoint(((IPEndPoint)Socket.LocalEndPoint!).Address, 0); 1128return FormatAddress(localEP.Address, localEP.Port); 1132return FormatAddressV6(localEP.Address, localEP.Port);
System\Net\NetworkStreamWrapper.cs (1)
35return ((IPEndPoint)Socket.RemoteEndPoint!).Address;
System.Net.Sockets (16)
src\libraries\Common\src\System\Net\IPEndPointExtensions.cs (4)
60SetIPAddress(destination, endPoint.Address); 73return endPoint.Address.Address == (long)SocketAddressPal.GetIPv4Address(socketAddressBuffer); 81if (endPoint.Address.ScopeId != (long)scopeid) 85endPoint.Address.TryWriteBytes(addressBuffer2, out _);
System\Net\Sockets\Socket.cs (4)
805if (!OSSupportsIPv4 && ipEndPoint != null && ipEndPoint.Address.IsIPv4MappedToIPv6) 3336IPAddress addr = ip.Address; 3570IPAddress? boundAddress = ipEndPoint?.Address; 3874IPAddress address = ipEndpoint.Address;
System\Net\Sockets\SocketsTelemetry.cs (2)
110activity.DisplayName = $"socket connect {ipEndPoint.Address}:{port}"; 113activity.SetTag("network.peer.address", ipEndPoint.Address.ToString());
System\Net\Sockets\UDPClient.cs (6)
297CheckForBroadcast(endPoint.Address); 577CheckForBroadcast(endPoint.Address); 611CheckForBroadcast(endPoint.Address); 826CheckForBroadcast(endPoint.Address); 872CheckForBroadcast(endPoint.Address); 907CheckForBroadcast(endPoint.Address);