private void SendAsyncLoop(SendAsyncState sendState) { sendAsyncLoopAgain: if (sendState.countToWrite > 0) { sendEventArgs.SetBuffer(sendState.byteBuffer.ReadOffset, sendState.countToWrite); if (UnderlyingSocket.SendAsync(sendEventArgs) == false) { // completed synchrounsly CompleteSend(sendEventArgs, false); goto sendAsyncLoopAgain; } } }
public override ValueTask <int> SendAsync(ReadOnlyMemory <byte> buffer, CancellationToken cancellationToken = default) => UnderlyingSocket.SendAsync(buffer, SocketFlags.None);
public bool SendAsync(SocketAsyncEventArgs args) { return(UnderlyingSocket.SendAsync(args)); }