8 types derived from EndPoint
Microsoft.AspNetCore.Connections.Abstractions (3)
Microsoft.Extensions.ServiceDiscovery (1)
System.Net.Primitives (2)
System.Net.Sockets (2)
296 references to EndPoint
ClientSample (4)
InMemory.FunctionalTests (8)
Microsoft.AspNetCore.Connections.Abstractions (30)
Microsoft.AspNetCore.Http.Connections.Client (2)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
Microsoft.AspNetCore.Server.Kestrel.Core (28)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (22)
KestrelServerTests.cs (21)
555.Setup(transportFactory => transportFactory.BindAsync(It.IsAny<EndPoint>(), It.IsAny<CancellationToken>()))
556.Returns<EndPoint, CancellationToken>((e, token) =>
612.Setup(transportFactory => transportFactory.BindAsync(It.IsAny<EndPoint>(), It.IsAny<CancellationToken>()))
613.Returns<EndPoint, CancellationToken>((e, token) =>
671.Setup(transportFactory => transportFactory.BindAsync(It.IsAny<EndPoint>(), It.IsAny<CancellationToken>()))
672.Returns<EndPoint, CancellationToken>((e, token) =>
807.Setup(transportFactory => transportFactory.BindAsync(It.IsAny<EndPoint>(), It.IsAny<CancellationToken>()))
808.Returns<EndPoint, CancellationToken>((e, token) =>
945.Setup(transportFactory => transportFactory.BindAsync(It.IsAny<EndPoint>(), It.IsAny<CancellationToken>()))
946.Returns<EndPoint, CancellationToken>((e, token) =>
993public ValueTask<IConnectionListener> BindAsync(EndPoint endpoint, CancellationToken cancellationToken = default)
995EndPoint resolvedEndPoint = endpoint;
1015public ValueTask<IConnectionListener> BindAsync(EndPoint endpoint, CancellationToken cancellationToken = default)
1023public ValueTask<IConnectionListener> BindAsync(EndPoint endpoint, CancellationToken cancellationToken = default)
1028public bool CanBind(EndPoint endpoint) => false;
1033public ValueTask<IMultiplexedConnectionListener> BindAsync(EndPoint endpoint, IFeatureCollection features = null, CancellationToken cancellationToken = default)
1038public bool CanBind(EndPoint endpoint) => false;
1045public ValueTask<IMultiplexedConnectionListener> BindAsync(EndPoint endpoint, IFeatureCollection features = null, CancellationToken cancellationToken = default)
1047EndPoint resolvedEndPoint = endpoint;
1065private record BindDetail(EndPoint OriginalEndPoint, EndPoint BoundEndPoint);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (8)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (5)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (8)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (11)
Microsoft.AspNetCore.SignalR.Client (1)
Microsoft.AspNetCore.SignalR.Client.Core (8)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
Microsoft.AspNetCore.SignalR.Client.Tests (9)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (5)
Microsoft.AspNetCore.SignalR.Tests.Utils (3)
Microsoft.Extensions.ServiceDiscovery (7)
Microsoft.Extensions.ServiceDiscovery.Abstractions (4)
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Microsoft.Extensions.ServiceDiscovery.Tests (11)
Microsoft.Gen.Logging.Generated.Tests (1)
netstandard (1)
Sockets.BindTests (5)
System (1)
System.Net (1)
System.Net.Ping (2)
System.Net.Primitives (3)
System.Net.Quic (2)
System.Net.Requests (1)
System.Net.Sockets (98)
System\Net\Sockets\Socket.cs (57)
35internal EndPoint? _rightEndPoint;
36internal EndPoint? _remoteEndPoint;
40private EndPoint? _localEndPoint;
59private EndPoint? _pendingConnectRightEndPoint;
294public EndPoint? LocalEndPoint
342public EndPoint? RemoteEndPoint
789public void Bind(EndPoint localEP)
801private void DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
830public void Connect(EndPoint remoteEP)
1341public int SendTo(byte[] buffer, int offset, int size, SocketFlags socketFlags, EndPoint remoteEP)
1379public int SendTo(byte[] buffer, int size, SocketFlags socketFlags, EndPoint remoteEP)
1386public int SendTo(byte[] buffer, SocketFlags socketFlags, EndPoint remoteEP)
1393public int SendTo(byte[] buffer, EndPoint remoteEP)
1404/// <param name="remoteEP">The <see cref="EndPoint"/> that represents the destination for the data.</param>
1409public int SendTo(ReadOnlySpan<byte> buffer, EndPoint remoteEP)
1421/// <param name="remoteEP">The <see cref="EndPoint"/> that represents the destination for the data.</param>
1426public int SendTo(ReadOnlySpan<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP)
1663public int ReceiveMessageFrom(byte[] buffer, int offset, int size, ref SocketFlags socketFlags, ref EndPoint remoteEP, out IPPacketInformation ipPacketInformation)
1677EndPoint endPointSnapshot = remoteEP;
1726/// An <see cref="EndPoint"/>, passed by reference, that represents the remote server.
1735/// <exception cref="ArgumentNullException">The <see cref="EndPoint"/> remoteEP is null.</exception>
1736/// <exception cref="ArgumentException">The <see cref="AddressFamily"/> of the <see cref="EndPoint"/> used in
1737/// <see cref="Socket.ReceiveMessageFrom(Span{byte}, ref SocketFlags, ref EndPoint, out IPPacketInformation)"/>
1738/// needs to match the <see cref="AddressFamily"/> of the <see cref="EndPoint"/> used in SendTo.</exception>
1742public int ReceiveMessageFrom(Span<byte> buffer, ref SocketFlags socketFlags, ref EndPoint remoteEP, out IPPacketInformation ipPacketInformation)
1764EndPoint endPointSnapshot = remoteEP;
1804public int ReceiveFrom(byte[] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP)
1818EndPoint endPointSnapshot = remoteEP;
1885public int ReceiveFrom(byte[] buffer, int size, SocketFlags socketFlags, ref EndPoint remoteEP)
1892public int ReceiveFrom(byte[] buffer, SocketFlags socketFlags, ref EndPoint remoteEP)
1899public int ReceiveFrom(byte[] buffer, ref EndPoint remoteEP)
1910/// <param name="remoteEP">An <see cref="EndPoint"/>, passed by reference, that represents the remote server.</param>
1915public int ReceiveFrom(Span<byte> buffer, ref EndPoint remoteEP)
1925/// <param name="remoteEP">An <see cref="EndPoint"/>, passed by reference, that represents the remote server.</param>
1930public int ReceiveFrom(Span<byte> buffer, SocketFlags socketFlags, ref EndPoint remoteEP)
1942EndPoint endPointSnapshot = remoteEP;
2448public IAsyncResult BeginConnect(EndPoint remoteEP, AsyncCallback? callback, object? state) =>
2572public IAsyncResult BeginSendTo(byte[] buffer, int offset, int size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback? callback, object? state)
2661public IAsyncResult BeginReceiveMessageFrom(byte[] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP, AsyncCallback? callback, object? state)
2676EndPoint resultEp = t.Result.RemoteEndPoint;
2684public int EndReceiveMessageFrom(IAsyncResult asyncResult, ref SocketFlags socketFlags, ref EndPoint endPoint, out IPPacketInformation ipPacketInformation)
2704public IAsyncResult BeginReceiveFrom(byte[] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP, AsyncCallback? callback, object? state)
2717EndPoint resultEp = t.Result.RemoteEndPoint;
2724public int EndReceiveFrom(IAsyncResult asyncResult, ref EndPoint endPoint)
2904EndPoint? endPointSnapshot = e.RemoteEndPoint;
2997EndPoint endPointSnapshot = e.RemoteEndPoint;
3093EndPoint? endPointSnapshot = e.RemoteEndPoint;
3164EndPoint endPointSnapshot = e.RemoteEndPoint;
3256EndPoint? endPointSnapshot = e.RemoteEndPoint;
3279EndPoint? oldEndPoint = _rightEndPoint;
3322internal static int GetAddressSize(EndPoint endPoint)
3331private SocketAddress Serialize(ref EndPoint remoteEP)
3350private void DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
3779internal Socket CreateAcceptSocket(SafeSocketHandle fd, EndPoint? remoteEP)
3787internal Socket UpdateAcceptSocket(Socket socket, EndPoint? remoteEP)
3864private static bool IsWildcardEndPoint(EndPoint? endPoint)
3953private void ValidateReceiveFromEndpointAndState(EndPoint remoteEndPoint, string remoteEndPointArgumentName)
System\Net\Sockets\Socket.Tasks.cs (20)
78public Task ConnectAsync(EndPoint remoteEP) => ConnectAsync(remoteEP, default).AsTask();
86public ValueTask ConnectAsync(EndPoint remoteEP, CancellationToken cancellationToken)
216EndPoint ep = IPAddress.TryParse(host, out IPAddress? parsedAddress) ? (EndPoint)
340public Task<SocketReceiveFromResult> ReceiveFromAsync(ArraySegment<byte> buffer, EndPoint remoteEndPoint) =>
350public Task<SocketReceiveFromResult> ReceiveFromAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint)
363public ValueTask<SocketReceiveFromResult> ReceiveFromAsync(Memory<byte> buffer, EndPoint remoteEndPoint, CancellationToken cancellationToken = default) =>
374public ValueTask<SocketReceiveFromResult> ReceiveFromAsync(Memory<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint, CancellationToken cancellationToken = default)
442public Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(ArraySegment<byte> buffer, EndPoint remoteEndPoint) =>
452public Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint)
465public ValueTask<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(Memory<byte> buffer, EndPoint remoteEndPoint, CancellationToken cancellationToken = default) =>
476public ValueTask<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(Memory<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint, CancellationToken cancellationToken = default)
604public Task<int> SendToAsync(ArraySegment<byte> buffer, EndPoint remoteEP) =>
614public Task<int> SendToAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP)
627public ValueTask<int> SendToAsync(ReadOnlyMemory<byte> buffer, EndPoint remoteEP, CancellationToken cancellationToken = default) =>
638public ValueTask<int> SendToAsync(ReadOnlyMemory<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP, CancellationToken cancellationToken = default)
1066EndPoint remoteEndPoint = RemoteEndPoint!;
1103EndPoint remoteEndPoint = RemoteEndPoint!;
1312EndPoint remoteEndPoint = RemoteEndPoint!;
1334EndPoint remoteEndPoint = RemoteEndPoint!;
System\Net\Sockets\SocketTaskExtensions.cs (5)
22public static Task ConnectAsync(this Socket socket, EndPoint remoteEP) =>
25public static ValueTask ConnectAsync(this Socket socket, EndPoint remoteEP, CancellationToken cancellationToken) =>
56public static Task<SocketReceiveFromResult> ReceiveFromAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) =>
59public static Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) =>
73public static Task<int> SendToAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP) =>