8 types derived from EndPoint
Microsoft.AspNetCore.Connections.Abstractions (3)
Microsoft.Extensions.ServiceDiscovery.Abstractions (1)
System.Net.Primitives (2)
System.Net.Sockets (2)
295 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 (4)
Microsoft.Extensions.ServiceDiscovery.Abstractions (6)
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)
1348public int SendTo(byte[] buffer, int offset, int size, SocketFlags socketFlags, EndPoint remoteEP)
1386public int SendTo(byte[] buffer, int size, SocketFlags socketFlags, EndPoint remoteEP)
1393public int SendTo(byte[] buffer, SocketFlags socketFlags, EndPoint remoteEP)
1400public int SendTo(byte[] buffer, EndPoint remoteEP)
1411/// <param name="remoteEP">The <see cref="EndPoint"/> that represents the destination for the data.</param>
1416public int SendTo(ReadOnlySpan<byte> buffer, EndPoint remoteEP)
1428/// <param name="remoteEP">The <see cref="EndPoint"/> that represents the destination for the data.</param>
1433public int SendTo(ReadOnlySpan<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP)
1670public int ReceiveMessageFrom(byte[] buffer, int offset, int size, ref SocketFlags socketFlags, ref EndPoint remoteEP, out IPPacketInformation ipPacketInformation)
1684EndPoint endPointSnapshot = remoteEP;
1733/// An <see cref="EndPoint"/>, passed by reference, that represents the remote server.
1742/// <exception cref="ArgumentNullException">The <see cref="EndPoint"/> remoteEP is null.</exception>
1743/// <exception cref="ArgumentException">The <see cref="AddressFamily"/> of the <see cref="EndPoint"/> used in
1744/// <see cref="Socket.ReceiveMessageFrom(Span{byte}, ref SocketFlags, ref EndPoint, out IPPacketInformation)"/>
1745/// needs to match the <see cref="AddressFamily"/> of the <see cref="EndPoint"/> used in SendTo.</exception>
1749public int ReceiveMessageFrom(Span<byte> buffer, ref SocketFlags socketFlags, ref EndPoint remoteEP, out IPPacketInformation ipPacketInformation)
1771EndPoint endPointSnapshot = remoteEP;
1811public int ReceiveFrom(byte[] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP)
1825EndPoint endPointSnapshot = remoteEP;
1892public int ReceiveFrom(byte[] buffer, int size, SocketFlags socketFlags, ref EndPoint remoteEP)
1899public int ReceiveFrom(byte[] buffer, SocketFlags socketFlags, ref EndPoint remoteEP)
1906public int ReceiveFrom(byte[] buffer, ref EndPoint remoteEP)
1917/// <param name="remoteEP">An <see cref="EndPoint"/>, passed by reference, that represents the remote server.</param>
1922public int ReceiveFrom(Span<byte> buffer, ref EndPoint remoteEP)
1932/// <param name="remoteEP">An <see cref="EndPoint"/>, passed by reference, that represents the remote server.</param>
1937public int ReceiveFrom(Span<byte> buffer, SocketFlags socketFlags, ref EndPoint remoteEP)
1949EndPoint endPointSnapshot = remoteEP;
2455public IAsyncResult BeginConnect(EndPoint remoteEP, AsyncCallback? callback, object? state) =>
2579public IAsyncResult BeginSendTo(byte[] buffer, int offset, int size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback? callback, object? state)
2668public IAsyncResult BeginReceiveMessageFrom(byte[] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP, AsyncCallback? callback, object? state)
2683EndPoint resultEp = t.Result.RemoteEndPoint;
2691public int EndReceiveMessageFrom(IAsyncResult asyncResult, ref SocketFlags socketFlags, ref EndPoint endPoint, out IPPacketInformation ipPacketInformation)
2711public IAsyncResult BeginReceiveFrom(byte[] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP, AsyncCallback? callback, object? state)
2724EndPoint resultEp = t.Result.RemoteEndPoint;
2731public int EndReceiveFrom(IAsyncResult asyncResult, ref EndPoint endPoint)
2911EndPoint? endPointSnapshot = e.RemoteEndPoint;
3004EndPoint endPointSnapshot = e.RemoteEndPoint;
3100EndPoint? endPointSnapshot = e.RemoteEndPoint;
3171EndPoint endPointSnapshot = e.RemoteEndPoint;
3263EndPoint? endPointSnapshot = e.RemoteEndPoint;
3286EndPoint? oldEndPoint = _rightEndPoint;
3329internal static int GetAddressSize(EndPoint endPoint)
3338private SocketAddress Serialize(ref EndPoint remoteEP)
3357private void DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
3786internal Socket CreateAcceptSocket(SafeSocketHandle fd, EndPoint? remoteEP)
3794internal Socket UpdateAcceptSocket(Socket socket, EndPoint? remoteEP)
3871private static bool IsWildcardEndPoint(EndPoint? endPoint)
3960private 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) =>