303 references to SocketFlags
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrSocketConnection.cs (2)
537_socket.Send(buffer, offset, size, SocketFlags.None); 584bytesRead = _socket.Receive(buffer, offset, size, SocketFlags.None);
netstandard (1)
netstandard.cs (1)
1273[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Sockets.SocketFlags))]
Sockets.FunctionalTests (4)
src\Servers\Kestrel\test\FunctionalTests\UnixDomainSocketsTests.cs (4)
102await socket.SendAsync(data, SocketFlags.None).DefaultTimeout(); 108var bytesReceived = await socket.ReceiveAsync(buffer.AsMemory(read, buffer.Length - read), SocketFlags.None).DefaultTimeout(); 170await socket.SendAsync(httpRequest, SocketFlags.None).DefaultTimeout(); 176var bytesReceived = await socket.ReceiveAsync(readBuffer.AsMemory(read), SocketFlags.None).DefaultTimeout();
System (1)
src\libraries\shims\System\ref\System.cs (1)
763[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Sockets.SocketFlags))]
System.IO.Pipes (4)
System\IO\Pipes\PipeStream.Unix.cs (4)
272return _handle!.PipeSocket.Receive(buffer, SocketFlags.None); 293int bytesWritten = _handle!.PipeSocket.Send(buffer, SocketFlags.None); 307return await InternalHandle!.PipeSocket.ReceiveAsync(destination, SocketFlags.None, cancellationToken).ConfigureAwait(false); 321int bytesWritten = await _handle!.PipeSocket.SendAsync(source, SocketFlags.None, cancellationToken).ConfigureAwait(false);
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (1)
191await socket.ReceiveAsync(Array.Empty<byte>(), SocketFlags.None).ConfigureAwait(false);
System.Net.Ping (5)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MessageHeader.cs (1)
19public SocketFlags Flags;
System\Net\NetworkInformation\Ping.RawSocket.cs (4)
258socket.SendTo(socketConfig.SendBuffer, SocketFlags.None, socketConfig.EndPoint); 268int bytesReceived = socket.ReceiveFrom(receiveBuffer, SocketFlags.None, ref socketConfig.EndPoint); 334SocketFlags.None, 349SocketFlags.None,
System.Net.Sockets (285)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MessageHeader.cs (1)
19public SocketFlags Flags;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Receive.cs (1)
13internal static unsafe partial Error Receive(SafeHandle socket, byte* buffer, int bufferLen, SocketFlags flags, int* received);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.ReceiveMessage.cs (1)
13internal static unsafe partial Error ReceiveMessage(SafeHandle socket, MessageHeader* messageHeader, SocketFlags flags, long* received);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Send.cs (1)
13internal static unsafe partial Error Send(SafeHandle socket, byte* buffer, int bufferLen, SocketFlags flags, int* sent);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SendMessage.cs (1)
13internal static unsafe partial Error SendMessage(SafeHandle socket, MessageHeader* messageHeader, SocketFlags flags, long* sent);
System\Net\Sockets\NetworkStream.cs (9)
265return _streamSocket.Receive(buffer, SocketFlags.None); 312_streamSocket.Send(buffer, offset, count, SocketFlags.None); 338_streamSocket.Send(buffer, SocketFlags.None); 450SocketFlags.None, 517SocketFlags.None, 576SocketFlags.None, 599SocketFlags.None, 637SocketFlags.None, 659SocketFlags.None,
System\Net\Sockets\Socket.cs (62)
1098public int Send(byte[] buffer, int size, SocketFlags socketFlags) 1105public int Send(byte[] buffer, SocketFlags socketFlags) 1116return Send(buffer, 0, buffer != null ? buffer.Length : 0, SocketFlags.None); 1123return Send(buffers, SocketFlags.None); 1126public int Send(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) 1139public int Send(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, out SocketError errorCode) 1177public int Send(byte[] buffer, int offset, int size, SocketFlags socketFlags) 1190public int Send(byte[] buffer, int offset, int size, SocketFlags socketFlags, out SocketError errorCode) 1229public int Send(ReadOnlySpan<byte> buffer) => Send(buffer, SocketFlags.None); 1231public int Send(ReadOnlySpan<byte> buffer, SocketFlags socketFlags) 1241public int Send(ReadOnlySpan<byte> buffer, SocketFlags socketFlags, out SocketError errorCode) 1343public int SendTo(byte[] buffer, int offset, int size, SocketFlags socketFlags, EndPoint remoteEP) 1381public int SendTo(byte[] buffer, int size, SocketFlags socketFlags, EndPoint remoteEP) 1388public int SendTo(byte[] buffer, SocketFlags socketFlags, EndPoint remoteEP) 1399return SendTo(buffer, 0, buffer != null ? buffer.Length : 0, SocketFlags.None, remoteEP); 1415return SendTo(buffer, SocketFlags.None, remoteEP); 1419/// Sends data to a specific endpoint using the specified <see cref="SocketFlags"/>. 1422/// <param name="socketFlags">A bitwise combination of the <see cref="SocketFlags"/> values.</param> 1428public int SendTo(ReadOnlySpan<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP) 1462/// Sends data to a specific endpoint using the specified <see cref="SocketFlags"/>. 1465/// <param name="socketFlags">A bitwise combination of the <see cref="SocketFlags"/> values.</param> 1471public int SendTo(ReadOnlySpan<byte> buffer, SocketFlags socketFlags, SocketAddress socketAddress) 1500public int Receive(byte[] buffer, int size, SocketFlags socketFlags) 1507public int Receive(byte[] buffer, SocketFlags socketFlags) 1518return Receive(buffer, 0, buffer != null ? buffer.Length : 0, SocketFlags.None); 1522public int Receive(byte[] buffer, int offset, int size, SocketFlags socketFlags) 1535public int Receive(byte[] buffer, int offset, int size, SocketFlags socketFlags, out SocketError errorCode) 1567public int Receive(Span<byte> buffer) => Receive(buffer, SocketFlags.None); 1569public int Receive(Span<byte> buffer, SocketFlags socketFlags) 1579public int Receive(Span<byte> buffer, SocketFlags socketFlags, out SocketError errorCode) 1610return Receive(buffers, SocketFlags.None); 1613public int Receive(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) 1626public int Receive(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, out SocketError errorCode) 1665public int ReceiveMessageFrom(byte[] buffer, int offset, int size, ref SocketFlags socketFlags, ref EndPoint remoteEP, out IPPacketInformation ipPacketInformation) 1725/// A bitwise combination of the <see cref="SocketFlags"/> values. 1739/// <see cref="Socket.ReceiveMessageFrom(Span{byte}, ref SocketFlags, ref EndPoint, out IPPacketInformation)"/> 1744public int ReceiveMessageFrom(Span<byte> buffer, ref SocketFlags socketFlags, ref EndPoint remoteEP, out IPPacketInformation ipPacketInformation) 1806public int ReceiveFrom(byte[] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP) 1887public int ReceiveFrom(byte[] buffer, int size, SocketFlags socketFlags, ref EndPoint remoteEP) 1894public int ReceiveFrom(byte[] buffer, SocketFlags socketFlags, ref EndPoint remoteEP) 1905return ReceiveFrom(buffer, 0, buffer != null ? buffer.Length : 0, SocketFlags.None, ref remoteEP); 1919return ReceiveFrom(buffer, SocketFlags.None, ref remoteEP); 1923/// Receives a datagram into the data buffer, using the specified <see cref="SocketFlags"/>, and stores the endpoint. 1926/// <param name="socketFlags">A bitwise combination of the <see cref="SocketFlags"/> values.</param> 1932public int ReceiveFrom(Span<byte> buffer, SocketFlags socketFlags, ref EndPoint remoteEP) 2006/// Receives a datagram into the data buffer, using the specified <see cref="SocketFlags"/>, and stores the endpoint. 2009/// <param name="socketFlags">A bitwise combination of the <see cref="SocketFlags"/> values.</param> 2015public int ReceiveFrom(Span<byte> buffer, SocketFlags socketFlags, SocketAddress receivedAddress) 2490public IAsyncResult BeginSend(byte[] buffer, int offset, int size, SocketFlags socketFlags, AsyncCallback? callback, object? state) 2500public IAsyncResult? BeginSend(byte[] buffer, int offset, int size, SocketFlags socketFlags, out SocketError errorCode, AsyncCallback? callback, object? state) 2518public IAsyncResult BeginSend(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, AsyncCallback? callback, object? state) 2527public IAsyncResult? BeginSend(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, out SocketError errorCode, AsyncCallback? callback, object? state) 2574public IAsyncResult BeginSendTo(byte[] buffer, int offset, int size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback? callback, object? state) 2588public IAsyncResult BeginReceive(byte[] buffer, int offset, int size, SocketFlags socketFlags, AsyncCallback? callback, object? state) 2597public IAsyncResult? BeginReceive(byte[] buffer, int offset, int size, SocketFlags socketFlags, out SocketError errorCode, AsyncCallback? callback, object? state) 2615public IAsyncResult BeginReceive(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, AsyncCallback? callback, object? state) 2623public IAsyncResult? BeginReceive(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, out SocketError errorCode, AsyncCallback? callback, object? state) 2663public IAsyncResult BeginReceiveMessageFrom(byte[] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP, AsyncCallback? callback, object? state) 2686public int EndReceiveMessageFrom(IAsyncResult asyncResult, ref SocketFlags socketFlags, ref EndPoint endPoint, out IPPacketInformation ipPacketInformation) 2706public IAsyncResult BeginReceiveFrom(byte[] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP, AsyncCallback? callback, object? state) 2770bytesReceived = await s.ReceiveAsync(buffer, SocketFlags.None).ConfigureAwait(false); 3472errorCode = SocketPal.Receive(handle, Array.Empty<byte>(), 0, 0, SocketFlags.None, out unused);
System\Net\Sockets\Socket.Tasks.cs (31)
277ReceiveAsync(buffer, SocketFlags.None); 285public Task<int> ReceiveAsync(ArraySegment<byte> buffer, SocketFlags socketFlags) => ReceiveAsync(buffer, socketFlags, fromNetworkStream: false); 287internal Task<int> ReceiveAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, bool fromNetworkStream) 300ReceiveAsync(buffer, SocketFlags.None, cancellationToken); 309public ValueTask<int> ReceiveAsync(Memory<byte> buffer, SocketFlags socketFlags, CancellationToken cancellationToken = default) => 312internal ValueTask<int> ReceiveAsync(Memory<byte> buffer, SocketFlags socketFlags, bool fromNetworkStream, CancellationToken cancellationToken) 336ReceiveAsync(buffers, SocketFlags.None); 344public Task<int> ReceiveAsync(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) 367ReceiveFromAsync(buffer, SocketFlags.None, remoteEndPoint); 376public Task<SocketReceiveFromResult> ReceiveFromAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) 390ReceiveFromAsync(buffer, SocketFlags.None, remoteEndPoint, cancellationToken); 400public ValueTask<SocketReceiveFromResult> ReceiveFromAsync(Memory<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint, CancellationToken cancellationToken = default) 434public ValueTask<int> ReceiveFromAsync(Memory<byte> buffer, SocketFlags socketFlags, SocketAddress receivedAddress, CancellationToken cancellationToken = default) 469ReceiveMessageFromAsync(buffer, SocketFlags.None, remoteEndPoint); 478public Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) 492ReceiveMessageFromAsync(buffer, SocketFlags.None, remoteEndPoint, cancellationToken); 502public ValueTask<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(Memory<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint, CancellationToken cancellationToken = default) 528SendAsync(buffer, SocketFlags.None); 536public Task<int> SendAsync(ArraySegment<byte> buffer, SocketFlags socketFlags) 549SendAsync(buffer, SocketFlags.None, cancellationToken); 558public ValueTask<int> SendAsync(ReadOnlyMemory<byte> buffer, SocketFlags socketFlags, CancellationToken cancellationToken = default) 576internal ValueTask SendAsyncForNetworkStream(ReadOnlyMemory<byte> buffer, SocketFlags socketFlags, CancellationToken cancellationToken) 600SendAsync(buffers, SocketFlags.None); 608public Task<int> SendAsync(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) 631SendToAsync(buffer, SocketFlags.None, remoteEP); 640public Task<int> SendToAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP) 654SendToAsync(buffer, SocketFlags.None, remoteEP, cancellationToken); 664public ValueTask<int> SendToAsync(ReadOnlyMemory<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP, CancellationToken cancellationToken = default) 693public ValueTask<int> SendToAsync(ReadOnlyMemory<byte> buffer, SocketFlags socketFlags, SocketAddress socketAddress, CancellationToken cancellationToken = default) 1130SocketFlags socketFlags = SocketFlags; 1360SocketFlags socketFlags = SocketFlags;
System\Net\Sockets\SocketAsyncContext.Unix.cs (70)
352public SocketFlags Flags; 359public Action<int, Memory<byte>, SocketFlags, SocketError>? Callback { get; set; } 362Callback!(BytesTransferred, SocketAddress, SocketFlags.None, ErrorCode); 389cb(bt, sa, SocketFlags.None, ec); 417cb(bt, sa, SocketFlags.None, ec); 437public SocketFlags Flags; 438public SocketFlags ReceivedFlags; 443public Action<int, Memory<byte>, SocketFlags, SocketError>? Callback { get; set; } 460if (Buffer.Length == 0 && Flags == SocketFlags.None && SocketAddress.Length == 0) 463ReceivedFlags = SocketFlags.None; 473ReceivedFlags = SocketFlags.None; 493SocketFlags rf = ReceivedFlags; 526SocketFlags rf = ReceivedFlags; 559public SocketFlags Flags; 561public SocketFlags ReceivedFlags; 570public Action<int, Memory<byte>, SocketFlags, IPPacketInformation, SocketError>? Callback { get; set; } 590public SocketFlags Flags; 592public SocketFlags ReceivedFlags; 600public Action<int, Memory<byte>, SocketFlags, IPPacketInformation, SocketError>? Callback { get; set; } 662SocketError error = context.SendToAsync(Buffer, 0, Buffer.Length, SocketFlags.None, Memory<byte>.Empty, ref BytesTransferred, Callback!, default); 684cb(bt, sa, SocketFlags.None, ec); 1534public SocketError ConnectAsync(Memory<byte> socketAddress, Action<int, Memory<byte>, SocketFlags, SocketError> callback, Memory<byte> buffer, out int sentBytes) 1559errorCode = SendToAsync(buffer.Slice(sentBytes), 0, remains, SocketFlags.None, Memory<byte>.Empty, ref sentBytes, callback!, default); 1584public SocketError Receive(Memory<byte> buffer, SocketFlags flags, int timeout, out int bytesReceived) 1589public SocketError Receive(Span<byte> buffer, SocketFlags flags, int timeout, out int bytesReceived) 1594public SocketError ReceiveAsync(Memory<byte> buffer, SocketFlags flags, out int bytesReceived, out SocketFlags receivedFlags, Action<int, Memory<byte>, SocketFlags, SocketError> callback, CancellationToken cancellationToken) 1599public unsafe SocketError ReceiveFrom(Memory<byte> buffer, ref SocketFlags flags, Memory<byte> socketAddress, out int socketAddressLen, int timeout, out int bytesReceived) 1605SocketFlags receivedFlags; 1632public unsafe SocketError ReceiveFrom(Span<byte> buffer, ref SocketFlags flags, Memory<byte> socketAddress, out int socketAddressLen, int timeout, out int bytesReceived) 1636SocketFlags receivedFlags; 1666public SocketError ReceiveAsync(Memory<byte> buffer, SocketFlags flags, out int bytesReceived, Action<int, Memory<byte>, SocketFlags, SocketError> callback, CancellationToken cancellationToken = default) 1698public SocketError ReceiveFromAsync(Memory<byte> buffer, SocketFlags flags, Memory<byte> socketAddress, out int socketAddressLen, out int bytesReceived, out SocketFlags receivedFlags, Action<int, Memory<byte>, SocketFlags, SocketError> callback, CancellationToken cancellationToken = default) 1730receivedFlags = SocketFlags.None; 1734public SocketError Receive(IList<ArraySegment<byte>> buffers, SocketFlags flags, int timeout, out int bytesReceived) 1739public SocketError ReceiveAsync(IList<ArraySegment<byte>> buffers, SocketFlags flags, out int bytesReceived, out SocketFlags receivedFlags, Action<int, Memory<byte>, SocketFlags, SocketError> callback) 1744public unsafe SocketError ReceiveFrom(IList<ArraySegment<byte>> buffers, ref SocketFlags flags, Memory<byte> socketAddress, out int socketAddressLen, int timeout, out int bytesReceived) 1750SocketFlags receivedFlags; 1776public SocketError ReceiveFromAsync(IList<ArraySegment<byte>> buffers, SocketFlags flags, Memory<byte> socketAddress, out int socketAddressLen, out int bytesReceived, out SocketFlags receivedFlags, Action<int, Memory<byte>, SocketFlags, SocketError> callback) 1806receivedFlags = SocketFlags.None; 1813Memory<byte> buffer, ref SocketFlags flags, Memory<byte> socketAddress, out int socketAddressLen, bool isIPv4, bool isIPv6, int timeout, out IPPacketInformation ipPacketInformation, out int bytesReceived) 1819SocketFlags receivedFlags; 1850Span<byte> buffer, ref SocketFlags flags, Memory<byte> socketAddress, out int socketAddressLen, bool isIPv4, bool isIPv6, int timeout, out IPPacketInformation ipPacketInformation, out int bytesReceived) 1856SocketFlags receivedFlags; 1889public SocketError ReceiveMessageFromAsync(Memory<byte> buffer, IList<ArraySegment<byte>>? buffers, SocketFlags flags, Memory<byte> socketAddress, out int socketAddressLen, bool isIPv4, bool isIPv6, out int bytesReceived, out SocketFlags receivedFlags, out IPPacketInformation ipPacketInformation, Action<int, Memory<byte>, SocketFlags, IPPacketInformation, SocketError> callback, CancellationToken cancellationToken = default) 1924receivedFlags = SocketFlags.None; 1928public SocketError Send(ReadOnlySpan<byte> buffer, SocketFlags flags, int timeout, out int bytesSent) => 1931public SocketError Send(byte[] buffer, int offset, int count, SocketFlags flags, int timeout, out int bytesSent) 1936public SocketError SendAsync(Memory<byte> buffer, int offset, int count, SocketFlags flags, out int bytesSent, Action<int, Memory<byte>, SocketFlags, SocketError> callback, CancellationToken cancellationToken) 1942public SocketError SendTo(byte[] buffer, int offset, int count, SocketFlags flags, Memory<byte> socketAddress, int timeout, out int bytesSent) 1974public unsafe SocketError SendTo(ReadOnlySpan<byte> buffer, SocketFlags flags, Memory<byte> socketAddress, int timeout, out int bytesSent) 2010public SocketError SendToAsync(Memory<byte> buffer, int offset, int count, SocketFlags flags, Memory<byte> socketAddress, ref int bytesSent, Action<int, Memory<byte>, SocketFlags, SocketError> callback, CancellationToken cancellationToken = default) 2043public SocketError Send(IList<ArraySegment<byte>> buffers, SocketFlags flags, int timeout, out int bytesSent) 2048public SocketError SendAsync(IList<ArraySegment<byte>> buffers, SocketFlags flags, out int bytesSent, Action<int, Memory<byte>, SocketFlags, SocketError> callback) 2053public SocketError SendTo(IList<ArraySegment<byte>> buffers, SocketFlags flags, Memory<byte> socketAddress, int timeout, out int bytesSent) 2087public SocketError SendToAsync(IList<ArraySegment<byte>> buffers, SocketFlags flags, Memory<byte> socketAddress, out int bytesSent, Action<int, Memory<byte>, SocketFlags, SocketError> callback)
System\Net\Sockets\SocketAsyncEventArgs.cs (10)
59private SocketFlags _socketFlags; 298public SocketFlags SocketFlags 431internal void SetResults(SocketError socketError, int bytesTransferred, SocketFlags flags) 439internal void SetResults(Exception exception, int bytesTransferred, SocketFlags flags) 627internal void FinishOperationSyncFailure(SocketError socketError, int bytesTransferred, SocketFlags flags) 659internal void FinishOperationAsyncFailure(SocketError socketError, int bytesTransferred, SocketFlags flags) 836SetResults(caughtException, 0, SocketFlags.None); 886internal void FinishOperationSyncSuccess(int bytesTransferred, SocketFlags flags) 1015internal void FinishOperationAsyncSuccess(int bytesTransferred, SocketFlags flags) 1032private void FinishOperationSync(SocketError socketError, int bytesTransferred, SocketFlags flags)
System\Net\Sockets\SocketAsyncEventArgs.Unix.cs (30)
15private SocketFlags _receivedFlags; 16private Action<int, Memory<byte>, SocketFlags, SocketError>? _transferCompletionCallback; 30CompletionCallback(0, SocketFlags.None, socketError); 63FinishOperationSync(socketError, 0, SocketFlags.None); 69private void ConnectCompletionCallback(int bytesTransferred, Memory<byte> socketAddress, SocketFlags receivedFlags, SocketError socketError) 71CompletionCallback(bytesTransferred, SocketFlags.None, socketError); 79FinishOperationSync(socketError, sentBytes, SocketFlags.None); 89FinishOperationSync(socketError, 0, SocketFlags.None); 97FinishOperationSync(socketError, 0, SocketFlags.None); 101private Action<int, Memory<byte>, SocketFlags, SocketError> TransferCompletionCallback => 104private void TransferCompletionCallbackCore(int bytesTransferred, Memory<byte> socketAddress, SocketFlags receivedFlags, SocketError socketError) 111private void CompleteTransferOperation(Memory<byte> _, int socketAddressSize, SocketFlags receivedFlags) 119_receivedFlags = System.Net.Sockets.SocketFlags.None; 122SocketFlags flags; 132flags = SocketFlags.None; 155_receivedFlags = System.Net.Sockets.SocketFlags.None; 158SocketFlags flags; 180private void ReceiveMessageFromCompletionCallback(int bytesTransferred, Memory<byte> socketAddress, SocketFlags receivedFlags, IPPacketInformation ipPacketInformation, SocketError errorCode) 187private void CompleteReceiveMessageFromOperation(Memory<byte> socketAddress, int socketAddressSize, SocketFlags receivedFlags, IPPacketInformation ipPacketInformation) 199_receivedFlags = System.Net.Sockets.SocketFlags.None; 207SocketFlags receivedFlags; 221_receivedFlags = System.Net.Sockets.SocketFlags.None; 237CompleteTransferOperation(null, 0, SocketFlags.None); 238FinishOperationSync(errorCode, bytesSent, SocketFlags.None); 292FinishOperationAsyncSuccess((int)bytesTransferred, SocketFlags.None); 296FinishOperationAsyncFailure(error, (int)bytesTransferred, SocketFlags.None); 305_receivedFlags = System.Net.Sockets.SocketFlags.None; 321CompleteTransferOperation(_socketAddress.Buffer, _socketAddress.Size, SocketFlags.None); 322FinishOperationSync(errorCode, bytesSent, SocketFlags.None); 385private void CompletionCallback(int bytesTransferred, SocketFlags flags, SocketError socketError)
System\Net\Sockets\SocketPal.Unix.cs (43)
120private static unsafe int SysReceive(SafeSocketHandle socket, SocketFlags flags, Span<byte> buffer, out Interop.Error errno) 144private static unsafe int SysReceive(SafeSocketHandle socket, SocketFlags flags, Span<byte> buffer, Span<byte> socketAddress, out int socketAddressLen, out SocketFlags receivedFlags, out Interop.Error errno) 214private static unsafe int SysSend(SafeSocketHandle socket, SocketFlags flags, ReadOnlySpan<byte> buffer, ref int offset, ref int count, out Interop.Error errno) 241private static unsafe int SysSend(SafeSocketHandle socket, SocketFlags flags, ReadOnlySpan<byte> buffer, ref int offset, ref int count, ReadOnlySpan<byte> socketAddress, out Interop.Error errno) 285private static unsafe int SysSend(SafeSocketHandle socket, SocketFlags flags, IList<ArraySegment<byte>> buffers, ref int bufferIndex, ref int offset, ReadOnlySpan<byte> socketAddress, out Interop.Error errno) 380private static unsafe int SysReceive(SafeSocketHandle socket, SocketFlags flags, IList<ArraySegment<byte>> buffers, Span<byte> socketAddress, out int socketAddressLen, out SocketFlags receivedFlags, out Interop.Error errno) 483private static unsafe int SysReceiveMessageFrom(SafeSocketHandle socket, SocketFlags flags, Span<byte> buffer, Span<byte> socketAddress, out int socketAddressLen, bool isIPv4, bool isIPv6, out SocketFlags receivedFlags, out IPPacketInformation ipPacketInformation, out Interop.Error errno) 539SafeSocketHandle socket, SocketFlags flags, IList<ArraySegment<byte>> buffers, 541out SocketFlags receivedFlags, out IPPacketInformation ipPacketInformation, out Interop.Error errno) 767public static bool TryCompleteReceiveFrom(SafeSocketHandle socket, Span<byte> buffer, SocketFlags flags, Span<byte> socketAddress, out int socketAddressLen, out int bytesReceived, out SocketFlags receivedFlags, out SocketError errorCode) => 770public static bool TryCompleteReceiveFrom(SafeSocketHandle socket, IList<ArraySegment<byte>> buffers, SocketFlags flags, Span<byte> socketAddress, out int socketAddressLen, out int bytesReceived, out SocketFlags receivedFlags, out SocketError errorCode) => 773public static unsafe bool TryCompleteReceive(SafeSocketHandle socket, Span<byte> buffer, SocketFlags flags, out int bytesReceived, out SocketError errorCode) 782Debug.Assert(flags == SocketFlags.None); 792received = SysReceive(socket, flags | SocketFlags.Peek, new Span<byte>(&oneBytePeekBuffer, 1), out errno); 832public static unsafe bool TryCompleteReceiveFrom(SafeSocketHandle socket, Span<byte> buffer, IList<ArraySegment<byte>>? buffers, SocketFlags flags, Span<byte> socketAddress, out int receivedSocketAddressLength, out int bytesReceived, out SocketFlags receivedFlags, out SocketError errorCode) 841Debug.Assert(flags == SocketFlags.None); 860received = SysReceive(socket, flags | SocketFlags.Peek, new Span<byte>(&oneBytePeekBuffer, 1), socketAddress, out receivedSocketAddressLength, out receivedFlags, out errno); 903public static unsafe bool TryCompleteReceiveMessageFrom(SafeSocketHandle socket, Span<byte> buffer, IList<ArraySegment<byte>>? buffers, SocketFlags flags, Memory<byte> socketAddress, out int receivedSocketAddressLength, bool isIPv4, bool isIPv6, out int bytesReceived, out SocketFlags receivedFlags, out IPPacketInformation ipPacketInformation, out SocketError errorCode) 949public static bool TryCompleteSendTo(SafeSocketHandle socket, Span<byte> buffer, ref int offset, ref int count, SocketFlags flags, ReadOnlySpan<byte> socketAddress, ref int bytesSent, out SocketError errorCode) 955public static bool TryCompleteSendTo(SafeSocketHandle socket, ReadOnlySpan<byte> buffer, SocketFlags flags, ReadOnlySpan<byte> socketAddress, ref int bytesSent, out SocketError errorCode) 961public static bool TryCompleteSendTo(SafeSocketHandle socket, IList<ArraySegment<byte>> buffers, ref int bufferIndex, ref int offset, SocketFlags flags, ReadOnlySpan<byte> socketAddress, ref int bytesSent, out SocketError errorCode) 967public static bool TryCompleteSendTo(SafeSocketHandle socket, ReadOnlySpan<byte> buffer, IList<ArraySegment<byte>>? buffers, ref int bufferIndex, ref int offset, ref int count, SocketFlags flags, ReadOnlySpan<byte> socketAddress, ref int bytesSent, out SocketError errorCode) 980Debug.Assert(flags == SocketFlags.None); 1178public static SocketError Send(SafeSocketHandle handle, IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, out int bytesTransferred) 1194public static SocketError Send(SafeSocketHandle handle, byte[] buffer, int offset, int count, SocketFlags socketFlags, out int bytesTransferred) 1207public static SocketError Send(SafeSocketHandle handle, ReadOnlySpan<byte> buffer, SocketFlags socketFlags, out int bytesTransferred) 1236public static SocketError SendTo(SafeSocketHandle handle, byte[] buffer, int offset, int count, SocketFlags socketFlags, Memory<byte> socketAddress, out int bytesTransferred) 1249public static SocketError SendTo(SafeSocketHandle handle, ReadOnlySpan<byte> buffer, SocketFlags socketFlags, Memory<byte> socketAddress, out int bytesTransferred) 1262public static SocketError Receive(SafeSocketHandle handle, IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, out int bytesTransferred) 1280public static SocketError Receive(SafeSocketHandle handle, byte[] buffer, int offset, int count, SocketFlags socketFlags, out int bytesTransferred) 1292public static SocketError Receive(SafeSocketHandle handle, Span<byte> buffer, SocketFlags socketFlags, out int bytesTransferred) 1304public static SocketError ReceiveMessageFrom(Socket socket, SafeSocketHandle handle, byte[] buffer, int offset, int count, ref SocketFlags socketFlags, SocketAddress socketAddress, out SocketAddress receiveAddress, out IPPacketInformation ipPacketInformation, out int bytesTransferred) 1330public static SocketError ReceiveMessageFrom(Socket socket, SafeSocketHandle handle, Span<byte> buffer, ref SocketFlags socketFlags, SocketAddress socketAddress, out SocketAddress receiveAddress, out IPPacketInformation ipPacketInformation, out int bytesTransferred) 1355public static SocketError ReceiveFrom(SafeSocketHandle handle, byte[] buffer, int offset, int count, SocketFlags socketFlags, Memory<byte> socketAddress, out int socketAddressLen, out int bytesTransferred) 1367public static SocketError ReceiveFrom(SafeSocketHandle handle, Span<byte> buffer, SocketFlags socketFlags, Memory<byte> socketAddress, out int socketAddressLen, out int bytesTransferred) 2096bytesTransferred = await socket.SendAsync(e.MemoryBuffer.Value, SocketFlags.None, cancellationToken).ConfigureAwait(false) + bytesTransferred;
System\Net\Sockets\SocketReceiveMessageFromResult.cs (1)
13public SocketFlags SocketFlags;
System\Net\Sockets\SocketTaskExtensions.cs (9)
47public static Task<int> ReceiveAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags) => 50public static ValueTask<int> ReceiveAsync(this Socket socket, Memory<byte> buffer, SocketFlags socketFlags, CancellationToken cancellationToken = default) => 53public static Task<int> ReceiveAsync(this Socket socket, IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) => 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) => 63public static Task<int> SendAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags) => 66public static ValueTask<int> SendAsync(this Socket socket, ReadOnlyMemory<byte> buffer, SocketFlags socketFlags, CancellationToken cancellationToken = default) => 69public static Task<int> SendAsync(this Socket socket, IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) => 73public static Task<int> SendToAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP) =>
System\Net\Sockets\UDPClient.cs (15)
293return _clientSocket.BeginSend(datagram, 0, bytes, SocketFlags.None, requestCallback, state); 298return _clientSocket.BeginSendTo(datagram, 0, bytes, SocketFlags.None, endPoint, requestCallback, state); 372return _clientSocket.BeginReceiveFrom(_buffer, 0, MaxUDPSize, SocketFlags.None, ref tempRemoteEP, requestCallback, state); 573return _clientSocket.SendAsync(new ArraySegment<byte>(datagram, 0, bytes), SocketFlags.None); 578return _clientSocket.SendToAsync(new ArraySegment<byte>(datagram, 0, bytes), SocketFlags.None, endPoint); 604return _clientSocket.SendAsync(datagram, SocketFlags.None, cancellationToken); 612return _clientSocket.SendToAsync(datagram, SocketFlags.None, endPoint, cancellationToken); 621SocketFlags.None, 647SocketFlags.None, 869return Client.Send(dgram, 0, bytes, SocketFlags.None); 874return Client.SendTo(dgram, 0, bytes, SocketFlags.None, endPoint); 904return Client.Send(datagram, SocketFlags.None); 909return Client.SendTo(datagram, SocketFlags.None, endPoint); 947return Client.Send(dgram, 0, bytes, SocketFlags.None); 972return Client.Send(datagram, SocketFlags.None);