protected sealed override async ValueTask WriteFrameAsync( IFrameWriter frameWriter, CancellationToken cancellationToken = default) { await frameWriter.WriteUShortAsync( Version ^ 0x8000, cancellationToken) .ConfigureAwait(false); await frameWriter.WriteUShortAsync(_type, cancellationToken) .ConfigureAwait(false); await frameWriter.WriteByteAsync(Flags, cancellationToken) .ConfigureAwait(false); await WriteControlFrameAsync(frameWriter, cancellationToken) .ConfigureAwait(false); }
protected override async ValueTask WriteFrameAsync( IFrameWriter frameWriter, CancellationToken cancellationToken = default) { var data = StreamId .SetBit(31, false); await frameWriter.WriteUInt32Async(data, cancellationToken) .ConfigureAwait(false); await frameWriter.WriteByteAsync((byte)Flags, cancellationToken) .ConfigureAwait(false); await frameWriter.WriteUInt24Async( UInt24.From((uint)Payload.Length), cancellationToken) .ConfigureAwait(false); await frameWriter.WriteBytesAsync(Payload, cancellationToken) .ConfigureAwait(false); }