1 instantiation of SocketAsyncContext
System.Net.Sockets (1)
System\Net\Sockets\SafeSocketHandle.Unix.cs (1)
119
Interlocked.CompareExchange(ref _asyncContext, new
SocketAsyncContext
(this), null) ??
52 references to SocketAsyncContext
System.Net.Sockets (52)
System\Net\Sockets\SafeSocketHandle.Unix.cs (2)
17
private
SocketAsyncContext
? _asyncContext;
117
internal
SocketAsyncContext
AsyncContext =>
System\Net\Sockets\SocketAsyncContext.Unix.cs (38)
128
public readonly
SocketAsyncContext
AssociatedContext;
136
public AsyncOperation(
SocketAsyncContext
context)
152
public OperationResult TryComplete(
SocketAsyncContext
context)
317
protected abstract bool DoTryComplete(
SocketAsyncContext
context);
328
public void TraceWithContext(
SocketAsyncContext
context, string message, [CallerMemberName] string? memberName = null)
338
public ReadOperation(
SocketAsyncContext
context) : base(context) { }
345
public WriteOperation(
SocketAsyncContext
context) : base(context) { }
357
public SendOperation(
SocketAsyncContext
context) : base(context) { }
369
public BufferMemorySendOperation(
SocketAsyncContext
context) : base(context) { }
371
protected override bool DoTryComplete(
SocketAsyncContext
context)
398
public BufferListSendOperation(
SocketAsyncContext
context) : base(context) { }
400
protected override bool DoTryComplete(
SocketAsyncContext
context)
425
public BufferPtrSendOperation(
SocketAsyncContext
context) : base(context) { }
427
protected override bool DoTryComplete(
SocketAsyncContext
context)
441
public ReceiveOperation(
SocketAsyncContext
context) : base(context) { }
454
public BufferMemoryReceiveOperation(
SocketAsyncContext
context) : base(context) { }
456
protected override bool DoTryComplete(
SocketAsyncContext
context)
509
public BufferListReceiveOperation(
SocketAsyncContext
context) : base(context) { }
511
protected override bool DoTryComplete(
SocketAsyncContext
context)
543
public BufferPtrReceiveOperation(
SocketAsyncContext
context) : base(context) { }
545
protected override bool DoTryComplete(
SocketAsyncContext
context)
568
public ReceiveMessageFromOperation(
SocketAsyncContext
context) : base(context) { }
572
protected override bool DoTryComplete(
SocketAsyncContext
context)
598
public BufferPtrReceiveMessageFromOperation(
SocketAsyncContext
context) : base(context) { }
602
protected override bool DoTryComplete(
SocketAsyncContext
context)
620
public AcceptOperation(
SocketAsyncContext
context) : base(context) { }
624
protected override bool DoTryComplete(
SocketAsyncContext
context)
657
public ConnectOperation(
SocketAsyncContext
context) : base(context) { }
659
protected override bool DoTryComplete(
SocketAsyncContext
context)
709
public SendFileOperation(
SocketAsyncContext
context) : base(context) { }
716
protected override bool DoTryComplete(
SocketAsyncContext
context) =>
820
public bool IsReady(
SocketAsyncContext
context, out int observedSequenceNumber)
846
public bool StartAsyncOperation(
SocketAsyncContext
context, TOperation operation, int observedSequenceNumber, CancellationToken cancellationToken = default)
934
static void HandleFailedRegistration(
SocketAsyncContext
context, TOperation operation, Interop.Error error)
960
public AsyncOperation? ProcessSyncEventOrGetAsyncEvent(
SocketAsyncContext
context, bool skipAsyncEvents = false)
1044
SocketAsyncContext
context = op.AssociatedContext;
1226
public bool StopAndAbort(
SocketAsyncContext
context)
1261
public void Trace(
SocketAsyncContext
context, string message, [CallerMemberName] string? memberName = null)
System\Net\Sockets\SocketAsyncEngine.Unix.cs (12)
44
private static bool PrefersInlineCompletions(
SocketAsyncContext
context) =>
100
/// Each <see cref="
SocketAsyncContext
"/> is assigned an index into this table while registered with a <see cref="SocketAsyncEngine"/>.
101
/// <para>The index is used as the <see cref="Interop.Sys.SocketEvent.Data"/> to quickly map events to <see cref="
SocketAsyncContext
"/>s.</para>
102
/// <para>It is also stored in <see cref="
SocketAsyncContext
.GlobalContextIndex"/> so that we can efficiently remove it when unregistering the socket.</para>
104
private static
SocketAsyncContext
?[] s_registeredContexts = [];
124
public static bool TryRegisterSocket(IntPtr socketHandle,
SocketAsyncContext
context, out SocketAsyncEngine? engine, out Interop.Error error)
133
private bool TryRegisterCore(IntPtr socketHandle,
SocketAsyncContext
context, out Interop.Error error)
171
public static void UnregisterSocket(
SocketAsyncContext
context)
274
SocketAsyncContext
? context = s_registeredContexts[(uint)socketEvent.Data];
375
public
SocketAsyncContext
? _context;
389
public void With(
SocketAsyncContext
context, Interop.Sys.SocketEvents events)
411
SocketAsyncContext
context = _context!;