2 instantiations of SocketReceiveFromResult
System.Net.Sockets (2)
System\Net\Sockets\Socket.Tasks.cs (2)
1098new ValueTask<SocketReceiveFromResult>(new SocketReceiveFromResult() { ReceivedBytes = bytesTransferred, RemoteEndPoint = remoteEndPoint }) : 1347return new SocketReceiveFromResult() { ReceivedBytes = bytes, RemoteEndPoint = remoteEndPoint };
28 references to SocketReceiveFromResult
netstandard (1)
netstandard.cs (1)
1278[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Sockets.SocketReceiveFromResult))]
System (1)
src\libraries\shims\System\ref\System.cs (1)
768[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Sockets.SocketReceiveFromResult))]
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
347SocketReceiveFromResult receiveResult = await socket.ReceiveFromAsync(
System.Net.Sockets (25)
System\Net\Sockets\Socket.cs (3)
2561Task<SocketReceiveFromResult> t = ReceiveFromAsync(buffer.AsMemory(offset, size), socketFlags, remoteEP).AsTask(); 2581SocketReceiveFromResult result = TaskToAsyncResult.End<SocketReceiveFromResult>(asyncResult);
System\Net\Sockets\Socket.Tasks.cs (17)
365/// <returns>An asynchronous task that completes with a <see cref="SocketReceiveFromResult"/> containing the number of bytes received and the endpoint of the sending host.</returns> 366public Task<SocketReceiveFromResult> ReceiveFromAsync(ArraySegment<byte> buffer, EndPoint remoteEndPoint) => 375/// <returns>An asynchronous task that completes with a <see cref="SocketReceiveFromResult"/> containing the number of bytes received and the endpoint of the sending host.</returns> 376public Task<SocketReceiveFromResult> ReceiveFromAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) 388/// <returns>An asynchronous task that completes with a <see cref="SocketReceiveFromResult"/> containing the number of bytes received and the endpoint of the sending host.</returns> 389public ValueTask<SocketReceiveFromResult> ReceiveFromAsync(Memory<byte> buffer, EndPoint remoteEndPoint, CancellationToken cancellationToken = default) => 399/// <returns>An asynchronous task that completes with a <see cref="SocketReceiveFromResult"/> containing the number of bytes received and the endpoint of the sending host.</returns> 400public ValueTask<SocketReceiveFromResult> ReceiveFromAsync(Memory<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint, CancellationToken cancellationToken = default) 406return ValueTask.FromCanceled<SocketReceiveFromResult>(cancellationToken); 433/// <returns>An asynchronous task that completes with a <see cref="SocketReceiveFromResult"/> containing the number of bytes received and the endpoint of the sending host.</returns> 999internal sealed class AwaitableSocketAsyncEventArgs : SocketAsyncEventArgs, IValueTaskSource, IValueTaskSource<int>, IValueTaskSource<Socket>, IValueTaskSource<SocketReceiveFromResult>, IValueTaskSource<SocketReceiveMessageFromResult> 1083public ValueTask<SocketReceiveFromResult> ReceiveFromAsync(Socket socket, CancellationToken cancellationToken) 1088return new ValueTask<SocketReceiveFromResult>(this, _mrvtsc.Version); 1098new ValueTask<SocketReceiveFromResult>(new SocketReceiveFromResult() { ReceivedBytes = bytesTransferred, RemoteEndPoint = remoteEndPoint }) : 1099ValueTask.FromException<SocketReceiveFromResult>(CreateException(error)); 1328SocketReceiveFromResult IValueTaskSource<SocketReceiveFromResult>.GetResult(short token)
System\Net\Sockets\SocketTaskExtensions.cs (1)
56public static Task<SocketReceiveFromResult> ReceiveFromAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) =>
System\Net\Sockets\UDPClient.cs (4)
616async Task<UdpReceiveResult> WaitAndWrap(Task<SocketReceiveFromResult> task) 618SocketReceiveFromResult result = await task.ConfigureAwait(false); 642async ValueTask<UdpReceiveResult> WaitAndWrap(ValueTask<SocketReceiveFromResult> task) 644SocketReceiveFromResult result = await task.ConfigureAwait(false);