116 instantiations of IPEndPoint
Aspire.Dashboard.Tests (1)
Aspire.Hosting.Tests (1)
dotnet-svcutil-lib (2)
Microsoft.AspNetCore.Http.Abstractions (2)
Microsoft.AspNetCore.HttpOverrides (2)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.IntegrationTesting (3)
Microsoft.AspNetCore.Server.Kestrel.Core (7)
Microsoft.AspNetCore.Testing (2)
Microsoft.Diagnostics.NETCore.Client (1)
Microsoft.DotNet.HotReload.Watch (1)
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
Microsoft.Extensions.ServiceDiscovery (1)
Microsoft.Extensions.ServiceDiscovery.Abstractions (2)
Microsoft.Extensions.ServiceDiscovery.Dns (4)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (8)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (1)
Microsoft.Extensions.ServiceDiscovery.Tests (11)
..\..\..\..\test\Libraries\Microsoft.Extensions.ServiceDiscovery.Tests\ServiceEndpointResolverTests.cs (9)
93collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080)));
98collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888)));
132Assert.Equal(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080), endpoints[0]);
133Assert.Equal(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888), endpoints[1]);
145collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080)));
150collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888)));
181collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080)));
186collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.2"), 8888)));
233collection.Endpoints.Add(ServiceEndpoint.Create(new IPEndPoint(IPAddress.Parse("127.1.1.1"), 8080)));
Microsoft.Gen.Logging.Generated.Tests (2)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (1)
Microsoft.TestPlatform.CommunicationUtilities (7)
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (2)
Microsoft.VisualStudio.TestPlatform.Client (1)
System.Net.HttpListener (1)
System.Net.NameResolution (4)
System.Net.NetworkInformation (2)
System.Net.Ping (2)
System.Net.Primitives (4)
System.Net.Quic (2)
System.Net.Requests (4)
System.Net.Sockets (29)
System.ServiceModel.NetTcp (1)
448 references to IPEndPoint
Aspire.Dashboard (2)
Aspire.Dashboard.Tests (8)
Aspire.StackExchange.Redis (1)
dotnet (1)
dotnet-svcutil-lib (7)
Microsoft.AspNetCore.Components.Testing (2)
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.HttpOverrides (3)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Microsoft.AspNetCore.Server.Kestrel.Core (38)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (7)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (5)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.Diagnostics.NETCore.Client (3)
Microsoft.DotNet.HotReload.Watch (3)
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
Microsoft.Extensions.ServiceDiscovery (1)
..\..\..\..\src\Libraries\Microsoft.Extensions.ServiceDiscovery\Http\ResolvingHttpDelegatingHandler.cs (1)
89case IPEndPoint ip:
Microsoft.Extensions.ServiceDiscovery.Abstractions (6)
Microsoft.Extensions.ServiceDiscovery.Dns (52)
..\..\..\..\src\Libraries\Microsoft.Extensions.ServiceDiscovery.Dns\Resolver\DnsResolver.cs (6)
37foreach (var server in OperatingSystem.IsLinux() || OperatingSystem.IsMacOS()
380IPEndPoint serverEndPoint = _options.Servers[index];
480internal async ValueTask<SendQueryResult> SendQueryToServerWithTimeoutAsync(IPEndPoint serverEndPoint, string name, EncodedDomainName dnsSafeName, QueryType queryType, int attempt, CancellationToken cancellationToken)
512private async ValueTask<SendQueryResult> SendQueryToServerAsync(IPEndPoint serverEndPoint, string name, EncodedDomainName dnsSafeName, QueryType queryType, int attempt, CancellationToken cancellationToken)
732internal static async ValueTask<(DnsDataReader reader, DnsMessageHeader header)> SendDnsQueryCoreUdpAsync(IPEndPoint serverEndPoint, EncodedDomainName dnsSafeName, QueryType queryType, CancellationToken cancellationToken)
781internal static async ValueTask<(DnsDataReader reader, DnsMessageHeader header, SendQueryError error)> SendDnsQueryCoreTcpAsync(IPEndPoint serverEndPoint, EncodedDomainName dnsSafeName, QueryType queryType, CancellationToken cancellationToken)
..\..\..\..\src\Libraries\Microsoft.Extensions.ServiceDiscovery.Dns\Resolver\DnsResolver.Log.cs (9)
13public static partial void Query(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt);
16public static partial void ResultTruncated(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt);
19public static partial void ErrorResponseCode(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, QueryResponseCode responseCode);
22public static partial void Timeout(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt);
25public static partial void NoData(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt);
28public static partial void NameError(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt);
31public static partial void MalformedResponse(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt);
34public static partial void NetworkError(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt, Exception exception);
37public static partial void QueryError(ILogger logger, QueryType queryType, string queryName, IPEndPoint server, int attempt, Exception exception);
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LoggerMessage.g.cs (28)
80private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __QueryCallback =
81global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(1, "Query"), "Resolving {QueryType} {QueryName} on {Server} attempt {Attempt}", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
84public static partial void Query(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt)
92private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __ResultTruncatedCallback =
93global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Debug, new global::Microsoft.Extensions.Logging.EventId(2, "ResultTruncated"), "Result truncated for {QueryType} {QueryName} from {Server} attempt {Attempt}. Restarting over TCP", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
96public static partial void ResultTruncated(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt)
110private readonly global::System.Net.IPEndPoint _server;
113public __ErrorResponseCodeStruct(global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryResponseCode responseCode)
124var Server = this._server;
162public static partial void ErrorResponseCode(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryResponseCode responseCode)
175private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __TimeoutCallback =
176global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(4, "Timeout"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt} timed out.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
179public static partial void Timeout(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt)
187private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __NoDataCallback =
188global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(5, "NoData"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt}: no data matching given query type.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
191public static partial void NoData(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt)
199private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __NameErrorCallback =
200global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(6, "NameError"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt}: server indicates given name does not exist.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
203public static partial void NameError(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt)
211private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __MalformedResponseCallback =
212global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(7, "MalformedResponse"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt} failed to return a valid DNS response.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
215public static partial void MalformedResponse(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt)
223private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __NetworkErrorCallback =
224global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Warning, new global::Microsoft.Extensions.Logging.EventId(8, "NetworkError"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt} failed due to a network error.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
227public static partial void NetworkError(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt, global::System.Exception exception)
235private static readonly global::System.Action<global::Microsoft.Extensions.Logging.ILogger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32, global::System.Exception?> __QueryErrorCallback =
236global::Microsoft.Extensions.Logging.LoggerMessage.Define<global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType, global::System.String, global::System.Net.IPEndPoint, global::System.Int32>(global::Microsoft.Extensions.Logging.LogLevel.Error, new global::Microsoft.Extensions.Logging.EventId(9, "QueryError"), "Query {QueryType} {QueryName} on {Server} attempt {Attempt} failed.", new global::Microsoft.Extensions.Logging.LogDefineOptions() { SkipEnabledCheck = true });
239public static partial void QueryError(global::Microsoft.Extensions.Logging.ILogger logger, global::Microsoft.Extensions.ServiceDiscovery.Dns.Resolver.QueryType queryType, global::System.String queryName, global::System.Net.IPEndPoint server, global::System.Int32 attempt, global::System.Exception exception)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (11)
..\..\..\..\test\Libraries\Microsoft.Extensions.ServiceDiscovery.Dns.Tests\Resolver\LoopbackDnsServer.cs (9)
18public IPEndPoint DnsEndPoint => (IPEndPoint)_dnsSocket.LocalEndPoint!;
32private static async Task<int> ProcessRequestCore(IPEndPoint remoteEndPoint, ArraySegment<byte> message, Func<LoopbackDnsResponseBuilder, IPEndPoint, Task> action, Memory<byte> responseBuffer)
52public async Task ProcessUdpRequest(Func<LoopbackDnsResponseBuilder, IPEndPoint, Task> action)
60int bytesWritten = await ProcessRequestCore((IPEndPoint)result.RemoteEndPoint, new ArraySegment<byte>(buffer, 0, result.ReceivedBytes), action, buffer.AsMemory(0, 512));
75public async Task ProcessTcpRequest(Func<LoopbackDnsResponseBuilder, IPEndPoint, Task> action)
80_tcpSocket.Bind(new IPEndPoint(IPAddress.Loopback, ((IPEndPoint)_dnsSocket.LocalEndPoint!).Port));
103int bytesWritten = await ProcessRequestCore((IPEndPoint)tcpClient.RemoteEndPoint!, new ArraySegment<byte>(buffer, 2, length), action, buffer.AsMemory(2));
Microsoft.Extensions.ServiceDiscovery.Tests (11)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (1)
Microsoft.TestPlatform.CommunicationUtilities (16)
Microsoft.TestPlatform.CrossPlatEngine (1)
netstandard (1)
System (1)
System.Net (1)
System.Net.Http (21)
System\Net\Http\HttpTelemetry.cs (4)
98private void ConnectionEstablished(byte versionMajor, byte versionMinor, long connectionId, string scheme, string host, int port, IPEndPoint? remoteEndPoint)
193public void Http11ConnectionEstablished(long connectionId, string scheme, string host, int port, IPEndPoint? remoteEndPoint)
208public void Http20ConnectionEstablished(long connectionId, string scheme, string host, int port, IPEndPoint? remoteEndPoint)
223public 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, long connectionId) = await ConnectAsync(request, async, isForHttp2: false, cancellationToken).ConfigureAwait(false);
300private async ValueTask<HttpConnection> ConstructHttp11ConnectionAsync(bool async, Stream stream, TransportContext? transportContext, HttpRequestMessage request, Activity? activity, IPEndPoint? remoteEndPoint, long connectionId, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (3)
196(Stream stream, TransportContext? transportContext, Activity? activity, IPEndPoint? remoteEndPoint, long connectionId) = await ConnectAsync(queueItem.Request, true, isForHttp2: true, cts.Token).ConfigureAwait(false);
255private async ValueTask<Http2Connection> ConstructHttp2ConnectionAsync(Stream stream, HttpRequestMessage request, Activity? activity, IPEndPoint? remoteEndPoint, long connectionId, CancellationToken cancellationToken)
310private async Task HandleHttp11Downgrade(HttpRequestMessage request, Stream stream, TransportContext? transportContext, Activity? activity, IPEndPoint? remoteEndPoint, long connectionId, CancellationToken cancellationToken)
System.Net.HttpListener (9)
System.Net.NameResolution (44)
System\Net\DnsResolverPal.Managed.cs (28)
52public static void ValidateServers(IPEndPoint[] servers)
54foreach (IPEndPoint server in servers)
63public static async Task<DnsResult<AddressRecord>> ResolveAddresses(IList<IPEndPoint> servers, bool async, string name, AddressFamily addressFamily, CancellationToken cancellationToken)
76public static async Task<DnsResult<SrvRecord>> ResolveSrv(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken)
82public static async Task<DnsResult<MxRecord>> ResolveMx(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken)
88public static async Task<DnsResult<TxtRecord>> ResolveTxt(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken)
94public static async Task<DnsResult<CNameRecord>> ResolveCName(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken)
100public static async Task<DnsResult<PtrRecord>> ResolvePtr(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken)
106public static async Task<DnsResult<NsRecord>> ResolveNs(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken)
382private static async Task<DnsResponse> SendQuery(IList<IPEndPoint> servers, bool async, string name, DnsRecordType qtype, CancellationToken cancellationToken)
384IReadOnlyList<IPEndPoint> serverList = GetServers(servers);
399foreach (IPEndPoint server in serverList)
623ReadOnlyMemory<byte> query, IPEndPoint server, byte[] responseBuffer, CancellationToken cancellationToken)
635ReadOnlyMemory<byte> query, IPEndPoint server, byte[] responseBuffer)
647ReadOnlyMemory<byte> query, IPEndPoint server, CancellationToken cancellationToken)
669ReadOnlyMemory<byte> query, IPEndPoint server)
683ReadOnlyMemory<byte> query, IPEndPoint server, CancellationToken cancellationToken)
718ReadOnlyMemory<byte> query, IPEndPoint server)
814private static IReadOnlyList<IPEndPoint> GetServers(IList<IPEndPoint> servers)
833if (servers is IReadOnlyList<IPEndPoint> readOnlyServers)
837IPEndPoint[] copy = new IPEndPoint[servers.Count];
842IPEndPoint[] resolved = new IPEndPoint[servers.Count];
845IPEndPoint server = servers[i];
851List<IPEndPoint> systemServers = ResolvConf.GetNameServers();
857return new IPEndPoint[] { new IPEndPoint(IPAddress.Loopback, ResolvConf.DefaultDnsPort) };
System.Net.NetworkInformation (22)
System.Net.Ping (6)
System.Net.Primitives (62)
System\Net\IPEndPoint.cs (53)
17public class IPEndPoint : EndPoint, ISpanFormattable, ISpanParsable<IPEndPoint>, IUtf8SpanFormattable, IUtf8SpanParsable<IPEndPoint>
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.
94public static bool TryParse(string s, [NotNullWhen(true)] out IPEndPoint? result)
99internal static bool InternalTryParse<TChar>(ReadOnlySpan<TChar> s, [NotNullWhen(true)] out IPEndPoint? result)
156/// <summary>Tries to convert the character span to its <see cref="IPEndPoint"/> equivalent.</summary>
157/// <param name="s">A span container the characters representing the <see cref="IPEndPoint"/> to convert.</param>
158/// <param name="result">When this method returns, contains the <see cref="IPEndPoint"/> value equivalent to what is contained in <paramref name="s" /> if the conversion succeeded, or default if the conversion failed. This parameter is passed uninitialized; any value originally supplied in result will be overwritten.</param>
160public static bool TryParse(ReadOnlySpan<char> s, [NotNullWhen(true)] out IPEndPoint? result) => InternalTryParse(s, out result);
162public static IPEndPoint Parse(string s)
169public static IPEndPoint Parse(ReadOnlySpan<char> s)
171if (TryParse(s, out IPEndPoint? result))
206return comparand is IPEndPoint other && other._address.Equals(_address) && other._port == _port;
214/// <summary>Converts the UTF-8 span to its <see cref="IPEndPoint"/> equivalent.</summary>
215/// <param name="utf8Text">A span containing the characters representing the <see cref="IPEndPoint"/> to convert.</param>
216/// <returns>contains the <see cref="IPEndPoint"/> value equivalent to what is contained in <paramref name="utf8Text" /> if the conversion succeeded</returns>
218public static IPEndPoint Parse(ReadOnlySpan<byte> utf8Text)
220if (TryParse(utf8Text, out IPEndPoint? result))
228/// <summary>Converts the character span to its <see cref="IPEndPoint"/> equivalent.</summary>
229/// <param name="s">A span containing the characters representing the <see cref="IPEndPoint"/> to convert.</param>
231/// <returns>contains the <see cref="IPEndPoint"/> value equivalent to what is contained in <paramref name="s" /> if the conversion succeeded</returns>
233static IPEndPoint ISpanParsable<IPEndPoint>.Parse(ReadOnlySpan<char> s, IFormatProvider? provider) => Parse(s);
235/// <summary>Converts the string to its <see cref="IPEndPoint"/> equivalent.</summary>
236/// <param name="s">A string containing the characters representing the <see cref="IPEndPoint"/> to convert.</param>
238/// <returns>contains the <see cref="IPEndPoint"/> value equivalent to what is contained in <paramref name="s" /> if the conversion succeeded</returns>
240static IPEndPoint IParsable<IPEndPoint>.Parse(string s, IFormatProvider? provider) => Parse(s);
242/// <summary>Converts the UTF-8 span to its <see cref="IPEndPoint"/> equivalent.</summary>
243/// <param name="utf8Text">A Span containing the UTF-8 characters representing the <see cref="IPEndPoint"/> to convert.</param>
245/// <returns>contains the <see cref="IPEndPoint"/> value equivalent to what is contained in <paramref name="utf8Text" /> if the conversion succeeded</returns>
247static IPEndPoint IUtf8SpanParsable<IPEndPoint>.Parse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider) => Parse(utf8Text);
249/// <summary>Tries to convert the UTF-8 span to its <see cref="IPEndPoint"/> equivalent.</summary>
250/// <param name="utf8Text">A span containing the UTF-8 characters representing the <see cref="IPEndPoint"/> to convert.</param>
251/// <param name="result">When this method returns, contains the <see cref="IPEndPoint"/> value equivalent to what is contained in <paramref name="utf8Text" /> if the conversion succeeded, or default if the conversion failed. This parameter is passed uninitialized; any value originally supplied in result will be overwritten.</param>
253public static bool TryParse(ReadOnlySpan<byte> utf8Text, [NotNullWhen(true)] out IPEndPoint? result) => InternalTryParse(utf8Text, out result);
255/// <summary>Tries to convert the character span to its <see cref="IPEndPoint"/> equivalent.</summary>
256/// <param name="s">A span container the characters representing the <see cref="IPEndPoint"/> to convert.</param>
258/// <param name="result">When this method returns, contains the <see cref="IPEndPoint"/> value equivalent to what is contained in <paramref name="s" /> if the conversion succeeded, or default if the conversion failed. This parameter is passed uninitialized; any value originally supplied in result will be overwritten.</param>
260static bool ISpanParsable<IPEndPoint>.TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, [NotNullWhen(true)] out IPEndPoint? result) => TryParse(s, out result);
262/// <summary>Tries to convert the string to its <see cref="IPEndPoint"/> equivalent.</summary>
263/// <param name="s">A string representing the <see cref="IPEndPoint"/> to convert.</param>
265/// <param name="result">When this method returns, contains the <see cref="IPEndPoint"/> value equivalent to what is contained in <paramref name="s" /> if the conversion succeeded, or default if the conversion failed. This parameter is passed uninitialized; any value originally supplied in result will be overwritten.</param>
267static bool IParsable<IPEndPoint>.TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, [NotNullWhen(true)] out IPEndPoint? result)
278/// <summary>Tries to convert the UTF-8 span to its <see cref="IPEndPoint"/> equivalent.</summary>
279/// <param name="utf8Text">A span container the characters representing the <see cref="IPEndPoint"/> to convert.</param>
281/// <param name="result">When this method returns, contains the <see cref="IPEndPoint"/> value equivalent to what is contained in <paramref name="utf8Text" /> if the conversion succeeded, or default if the conversion failed. This parameter is passed uninitialized; any value originally supplied in result will be overwritten.</param>
283static bool IUtf8SpanParsable<IPEndPoint>.TryParse(ReadOnlySpan<byte> utf8Text, IFormatProvider? provider, [NotNullWhen(true)] out IPEndPoint? result) => TryParse(utf8Text, out result);
System.Net.Quic (14)
System.Net.Requests (14)
System.Net.Sockets (54)
System\Net\Sockets\UDPClient.cs (20)
64IPEndPoint localEP;
83public UdpClient(IPEndPoint localEP)
290public IAsyncResult BeginSend(byte[] datagram, int bytes, IPEndPoint? endPoint, AsyncCallback? requestCallback, object? state)
318private void ValidateDatagram(byte[] datagram, int bytes, IPEndPoint? endPoint)
334private IPEndPoint? GetEndpoint(string? hostname, int port)
342IPEndPoint? ipEndPoint = null;
380public byte[] EndReceive(IAsyncResult asyncResult, ref IPEndPoint? remoteEP)
391remoteEP = (IPEndPoint)tempRemoteEP;
572public Task<int> SendAsync(byte[] datagram, int bytes, IPEndPoint? endPoint)
594/// An <see cref="IPEndPoint"/> that represents the host and port to which to send the datagram.
603public ValueTask<int> SendAsync(ReadOnlyMemory<byte> datagram, IPEndPoint? endPoint, CancellationToken cancellationToken = default)
633return new UdpReceiveResult(buffer, (IPEndPoint)result.RemoteEndPoint);
659return new UdpReceiveResult(buffer, (IPEndPoint)result.RemoteEndPoint);
818IPEndPoint endPoint = new IPEndPoint(addr, port);
823public void Connect(IPEndPoint endPoint)
836public byte[] Receive([NotNull] ref IPEndPoint? remoteEP)
850remoteEP = (IPEndPoint)tempRemoteEP;
859public int Send(byte[] dgram, int bytes, IPEndPoint? endPoint)
889/// An <see cref="IPEndPoint"/> that represents the host and port to which to send the datagram.
895public int Send(ReadOnlySpan<byte> datagram, IPEndPoint? endPoint)
System.ServiceModel.NetTcp (7)