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