228 instantiations of IPEndPoint
ClientSample (2)
dotnet-svcutil-lib (2)
http2cat (1)
HttpsPolicySample (2)
IIS.Common.TestLib (1)
IIS.FunctionalTests (2)
IIS.LongTests (2)
IIS.NewHandler.FunctionalTests (2)
IIS.NewShim.FunctionalTests (2)
IISExpress.FunctionalTests (3)
InMemory.FunctionalTests (32)
Microsoft.AspNetCore.Http.Extensions.Tests (4)
RequestDelegateFactoryTests.cs (2)
333new object[] { (Action<HttpContext, IPEndPoint[]>)Store, new[] { "127.0.0.1:80" },new[] { new IPEndPoint(IPAddress.Loopback, 80) } },
384new object[] { (Action<HttpContext, IPEndPoint>)Store, "127.0.0.1:80", new IPEndPoint(IPAddress.Loopback, 80) },
Microsoft.AspNetCore.HttpOverrides (2)
Microsoft.AspNetCore.HttpOverrides.Tests (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.Server.IntegrationTesting (3)
Microsoft.AspNetCore.Server.Kestrel.Core (7)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (29)
KestrelServerTests.cs (25)
107serverOptions.Listen(new IPEndPoint(IPAddress.Loopback, 0));
342serverOptions.Listen(new IPEndPoint(IPAddress.Loopback, 0));
358var endpoint = new IPEndPoint(IPAddress.Loopback, 0);
379serverOptions.Listen(new IPEndPoint(IPAddress.Loopback, 0), c =>
399var endpoint = new IPEndPoint(IPAddress.Loopback, 0);
543new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0))
600new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0))
660new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0))
722new ListenOptions(new IPEndPoint(IPAddress.Loopback, 0))
826mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5000), It.IsAny<CancellationToken>()), Times.Once);
827mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5001), It.IsAny<CancellationToken>()), Times.Once);
828mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5002), It.IsAny<CancellationToken>()), Times.Never);
829mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5003), It.IsAny<CancellationToken>()), Times.Never);
847mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5000), It.IsAny<CancellationToken>()), Times.Once);
848mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5001), It.IsAny<CancellationToken>()), Times.Once);
849mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5002), It.IsAny<CancellationToken>()), Times.Once);
850mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5003), It.IsAny<CancellationToken>()), Times.Once);
876mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5000), It.IsAny<CancellationToken>()), Times.Once);
877mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5001), It.IsAny<CancellationToken>()), Times.Once);
878mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5002), It.IsAny<CancellationToken>()), Times.Once);
879mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5003), It.IsAny<CancellationToken>()), Times.Exactly(2));
964mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5000), It.IsAny<CancellationToken>()), Times.Once);
965mockTransportFactory.Verify(f => f.BindAsync(new IPEndPoint(IPAddress.IPv6Any, 5001), It.IsAny<CancellationToken>()), Times.Once);
1000resolvedEndPoint = new IPEndPoint(new IPAddress(ipEndPoint.Address.GetAddressBytes()), port);
1052resolvedEndPoint = new IPEndPoint(new IPAddress(ipEndPoint.Address.GetAddressBytes()), port);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (6)
Microsoft.AspNetCore.SignalR.Client.Tests (1)
Microsoft.AspNetCore.Testing (2)
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
Microsoft.Extensions.ServiceDiscovery (2)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (4)
Microsoft.Extensions.ServiceDiscovery.Tests (11)
ServiceEndpointResolverTests.cs (9)
91collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080)));
96collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888)));
130Assert.Equal(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080), endpoints[0]);
131Assert.Equal(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888), endpoints[1]);
143collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080)));
148collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888)));
179collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080)));
184collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888)));
231collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080)));
Microsoft.Gen.Logging.Generated.Tests (2)
Sockets.BindTests (39)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (32)
344=> RunTestWithStaticPort(port => RegisterIPEndPoint_Success(new IPEndPoint(address, port), testUrl, port));
540socket.Bind(new IPEndPoint(IPAddress.Loopback, 0));
575socket.Bind(new IPEndPoint(IPAddress.IPv6Loopback, 0));
613options.Listen(new IPEndPoint(IPAddress.Loopback, 0), listenOptions =>
658options.Listen(new IPEndPoint(IPAddress.Loopback, 0), listenOptions =>
700options.Listen(new IPEndPoint(IPAddress.Loopback, 0), listenOptions =>
943socket.Bind(new IPEndPoint(IPAddress.IPv6Any, 0));
952socket.Bind(new IPEndPoint(address, port));
1022.Where(ip => CanBindAndConnectToEndpoint(new IPEndPoint(ip, 0)));
1047dataset.Add(new IPEndPoint(IPAddress.Loopback, 0), "http://127.0.0.1");
1048dataset.Add(new IPEndPoint(IPAddress.Loopback, 0), "https://127.0.0.1");
1051dataset.Add(new IPEndPoint(IPAddress.IPv6Loopback, 0), "http://[::1]");
1052dataset.Add(new IPEndPoint(IPAddress.IPv6Loopback, 0), "https://[::1]");
1055dataset.Add(new IPEndPoint(IPAddress.Any, 0), "http://127.0.0.1");
1056dataset.Add(new IPEndPoint(IPAddress.Any, 0), "https://127.0.0.1");
1059dataset.Add(new IPEndPoint(IPAddress.IPv6Any, 0), "http://127.0.0.1");
1060dataset.Add(new IPEndPoint(IPAddress.IPv6Any, 0), "http://[::1]");
1061dataset.Add(new IPEndPoint(IPAddress.IPv6Any, 0), "https://127.0.0.1");
1062dataset.Add(new IPEndPoint(IPAddress.IPv6Any, 0), "https://[::1]");
1067.Where(ip => CanBindAndConnectToEndpoint(new IPEndPoint(ip, 0)));
1071dataset.Add(new IPEndPoint(ip, 0), $"http://{ip}");
1072dataset.Add(new IPEndPoint(ip, 0), $"https://{ip}");
1078.Where(ip => CanBindAndConnectToEndpoint(new IPEndPoint(ip, 0)));
1082dataset.Add(new IPEndPoint(ip, 0), $"http://[{ip}]");
1102{ new IPEndPoint(IPAddress.Loopback, 443), "https://127.0.0.1" },
1103{ new IPEndPoint(IPAddress.IPv6Loopback, 443), "https://[::1]" },
1104{ new IPEndPoint(IPAddress.Any, 443), "https://127.0.0.1" },
1105{ new IPEndPoint(IPAddress.IPv6Any, 443), "https://[::1]" }
1126.Where(ip => CanBindAndConnectToEndpoint(new IPEndPoint(ip, 0)));
1162.Where(ip => CanBindAndConnectToEndpoint(new IPEndPoint(ip, 0)));
1202socket.Bind(new IPEndPoint(IPAddress.Loopback, 0));
1252socket.Bind(new IPEndPoint(address, port));
Sockets.FunctionalTests (19)
System.Net.HttpListener (1)
System.Net.NetworkInformation (2)
System.Net.Ping (2)
System.Net.Primitives (3)
System.Net.Quic (2)
System.Net.Requests (4)
System.Net.Sockets (29)
352 references to IPEndPoint
Aspire.Dashboard (2)
Aspire.Dashboard.Tests (7)
Aspire.StackExchange.Redis (1)
ClientSample (1)
dotnet-svcutil-lib (7)
http2cat (1)
IIS.FunctionalTests (1)
IIS.LongTests (1)
IIS.NewHandler.FunctionalTests (1)
IIS.NewShim.FunctionalTests (1)
IISExpress.FunctionalTests (1)
InMemory.FunctionalTests (13)
Interop.FunctionalTests (5)
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateFactoryTests.cs (2)
333new object[] { (Action<HttpContext, IPEndPoint[]>)Store, new[] { "127.0.0.1:80" },new[] { new IPEndPoint(IPAddress.Loopback, 80) } },
384new object[] { (Action<HttpContext, IPEndPoint>)Store, "127.0.0.1:80", new IPEndPoint(IPAddress.Loopback, 80) },
Microsoft.AspNetCore.HttpOverrides (3)
Microsoft.AspNetCore.Mvc.Core.Test (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Microsoft.AspNetCore.Server.Kestrel.Core (38)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (37)
KestrelServerTests.cs (18)
358var endpoint = new IPEndPoint(IPAddress.Loopback, 0);
399var endpoint = new IPEndPoint(IPAddress.Loopback, 0);
473Assert.Equal(IPAddress.IPv6Any, ((IPEndPoint)transportEndPoint.OriginalEndPoint).Address);
474Assert.Equal(IPAddress.IPv6Any, ((IPEndPoint)multiplexedTransportEndPoint.OriginalEndPoint).Address);
476Assert.Equal(5000, ((IPEndPoint)transportEndPoint.OriginalEndPoint).Port);
477Assert.Equal(5000, ((IPEndPoint)multiplexedTransportEndPoint.OriginalEndPoint).Port);
502Assert.Equal(IPAddress.IPv6Any, ((IPEndPoint)transportEndPoint.OriginalEndPoint).Address);
505Assert.NotEqual(0, ((IPEndPoint)transportEndPoint.BoundEndPoint).Port);
530Assert.Equal(IPAddress.IPv6Any, ((IPEndPoint)multiplexedTransportEndPoint.OriginalEndPoint).Address);
533Assert.NotEqual(0, ((IPEndPoint)multiplexedTransportEndPoint.BoundEndPoint).Port);
856if (((IPEndPoint)mockTransport.Object.EndPoint).Port == 5001)
887var port = ((IPEndPoint)mockTransport.Object.EndPoint).Port;
994if (resolvedEndPoint is IPEndPoint ipEndPoint)
997? Random.Shared.Next(IPEndPoint.MinPort, IPEndPoint.MaxPort)
1046if (resolvedEndPoint is IPEndPoint ipEndPoint)
1049? Random.Shared.Next(IPEndPoint.MinPort, IPEndPoint.MaxPort)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (8)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (4)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (10)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (5)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
Microsoft.Extensions.ServiceDiscovery (1)
Microsoft.Extensions.ServiceDiscovery.Abstractions (2)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (4)
DnsSrvServiceEndpointResolverTests.cs (4)
42public IDnsQueryResponse QueryServer(IReadOnlyCollection<IPEndPoint> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN) => throw new NotImplementedException();
48public Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<IPEndPoint> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default) => throw new NotImplementedException();
50public IDnsQueryResponse QueryServerReverse(IReadOnlyCollection<IPEndPoint> servers, IPAddress ipAddress) => throw new NotImplementedException();
54public Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<IPEndPoint> servers, IPAddress ipAddress, CancellationToken cancellationToken = default) => throw new NotImplementedException();
Microsoft.Extensions.ServiceDiscovery.Tests (11)
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (4)
YarpServiceDiscoveryTests.cs (4)
336public IDnsQueryResponse QueryServer(IReadOnlyCollection<IPEndPoint> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN) => throw new NotImplementedException();
342public Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<IPEndPoint> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default) => throw new NotImplementedException();
344public IDnsQueryResponse QueryServerReverse(IReadOnlyCollection<IPEndPoint> servers, IPAddress ipAddress) => throw new NotImplementedException();
348public Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<IPEndPoint> servers, IPAddress ipAddress, CancellationToken cancellationToken = default) => throw new NotImplementedException();
Microsoft.Gen.Logging.Generated.Tests (1)
netstandard (1)
Sockets.BindTests (12)
Sockets.FunctionalTests (3)
System (1)
System.Net (1)
System.Net.Http (18)
System\Net\Http\HttpTelemetry.cs (4)
103private void ConnectionEstablished(byte versionMajor, byte versionMinor, long connectionId, string scheme, string host, int port, IPEndPoint? remoteEndPoint)
207public void Http11ConnectionEstablished(long connectionId, string scheme, string host, int port, IPEndPoint? remoteEndPoint)
222public void Http20ConnectionEstablished(long connectionId, string scheme, string host, int port, IPEndPoint? remoteEndPoint)
237public void Http30ConnectionEstablished(long connectionId, string scheme, string host, int port, IPEndPoint? remoteEndPoint)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http1.cs (2)
296(Stream stream, TransportContext? transportContext, Activity? activity, IPEndPoint? remoteEndPoint) = await ConnectAsync(request, async, cancellationToken).ConfigureAwait(false);
300private async ValueTask<HttpConnection> ConstructHttp11ConnectionAsync(bool async, Stream stream, TransportContext? transportContext, HttpRequestMessage request, Activity? activity, IPEndPoint? remoteEndPoint, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (3)
187(Stream stream, TransportContext? transportContext, Activity? activity, IPEndPoint? remoteEndPoint) = await ConnectAsync(queueItem.Request, true, cts.Token).ConfigureAwait(false);
246private async ValueTask<Http2Connection> ConstructHttp2ConnectionAsync(Stream stream, HttpRequestMessage request, Activity? activity, IPEndPoint? remoteEndPoint, CancellationToken cancellationToken)
289private async Task HandleHttp11Downgrade(HttpRequestMessage request, Stream stream, TransportContext? transportContext, Activity? activity, IPEndPoint? remoteEndPoint, CancellationToken cancellationToken)
System.Net.HttpListener (9)
System.Net.NetworkInformation (22)
System.Net.Ping (6)
System.Net.Primitives (17)
System.Net.Quic (14)
System.Net.Requests (14)
System.Net.Sockets (54)
System\Net\Sockets\UDPClient.cs (20)
64IPEndPoint localEP;
83public UdpClient(IPEndPoint localEP)
285public IAsyncResult BeginSend(byte[] datagram, int bytes, IPEndPoint? endPoint, AsyncCallback? requestCallback, object? state)
313private void ValidateDatagram(byte[] datagram, int bytes, IPEndPoint? endPoint)
329private IPEndPoint? GetEndpoint(string? hostname, int port)
337IPEndPoint? ipEndPoint = null;
375public byte[] EndReceive(IAsyncResult asyncResult, ref IPEndPoint? remoteEP)
386remoteEP = (IPEndPoint)tempRemoteEP;
567public Task<int> SendAsync(byte[] datagram, int bytes, IPEndPoint? endPoint)
589/// An <see cref="IPEndPoint"/> that represents the host and port to which to send the datagram.
598public ValueTask<int> SendAsync(ReadOnlyMemory<byte> datagram, IPEndPoint? endPoint, CancellationToken cancellationToken = default)
628return new UdpReceiveResult(buffer, (IPEndPoint)result.RemoteEndPoint);
654return new UdpReceiveResult(buffer, (IPEndPoint)result.RemoteEndPoint);
813IPEndPoint endPoint = new IPEndPoint(addr, port);
818public void Connect(IPEndPoint endPoint)
831public byte[] Receive([NotNull] ref IPEndPoint? remoteEP)
845remoteEP = (IPEndPoint)tempRemoteEP;
854public int Send(byte[] dgram, int bytes, IPEndPoint? endPoint)
884/// An <see cref="IPEndPoint"/> that represents the host and port to which to send the datagram.
890public int Send(ReadOnlySpan<byte> datagram, IPEndPoint? endPoint)