2 instantiations of SocketReceiveFromResult
System.Net.Sockets (2)
System\Net\Sockets\Socket.Tasks.cs (2)
1098
new ValueTask<SocketReceiveFromResult>(new
SocketReceiveFromResult
() { ReceivedBytes = bytesTransferred, RemoteEndPoint = remoteEndPoint }) :
1347
return 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)
347
SocketReceiveFromResult
receiveResult = await socket.ReceiveFromAsync(
System.Net.Sockets (25)
System\Net\Sockets\Socket.cs (3)
2714
Task<
SocketReceiveFromResult
> t = ReceiveFromAsync(buffer.AsMemory(offset, size), socketFlags, remoteEP).AsTask();
2736
SocketReceiveFromResult
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>
366
public 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>
376
public 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>
389
public 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>
400
public ValueTask<
SocketReceiveFromResult
> ReceiveFromAsync(Memory<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint, CancellationToken cancellationToken = default)
406
return 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>
999
internal sealed class AwaitableSocketAsyncEventArgs : SocketAsyncEventArgs, IValueTaskSource, IValueTaskSource<int>, IValueTaskSource<Socket>, IValueTaskSource<
SocketReceiveFromResult
>, IValueTaskSource<SocketReceiveMessageFromResult>
1083
public ValueTask<
SocketReceiveFromResult
> ReceiveFromAsync(Socket socket, CancellationToken cancellationToken)
1088
return new ValueTask<
SocketReceiveFromResult
>(this, _mrvtsc.Version);
1098
new ValueTask<
SocketReceiveFromResult
>(new SocketReceiveFromResult() { ReceivedBytes = bytesTransferred, RemoteEndPoint = remoteEndPoint }) :
1099
ValueTask.FromException<
SocketReceiveFromResult
>(CreateException(error));
1328
SocketReceiveFromResult
IValueTaskSource<
SocketReceiveFromResult
>.GetResult(short token)
System\Net\Sockets\SocketTaskExtensions.cs (1)
56
public static Task<
SocketReceiveFromResult
> ReceiveFromAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) =>
System\Net\Sockets\UDPClient.cs (4)
624
async Task<UdpReceiveResult> WaitAndWrap(Task<
SocketReceiveFromResult
> task)
626
SocketReceiveFromResult
result = await task.ConfigureAwait(false);
650
async ValueTask<UdpReceiveResult> WaitAndWrap(ValueTask<
SocketReceiveFromResult
> task)
652
SocketReceiveFromResult
result = await task.ConfigureAwait(false);