Esempio n. 1
0
 internal sealed override async Task WriteToCoreAsync(
     WriteBuffer writeBuffer, CancellationToken cancellationToken)
 {
     await base.WriteToCoreAsync(writeBuffer, cancellationToken);
     await writeBuffer.ReserveAsync(3, cancellationToken);
     writeBuffer[writeBuffer.Count++] = (byte)this.PacketFlags;
     writeBuffer[writeBuffer.Count++] = this.dtd;
     writeBuffer[writeBuffer.Count++] = (byte)this.applicationBytes.Length;
     await writeBuffer.WriteAsync(
         this.applicationBytes, 0, this.applicationBytes.Length, cancellationToken);
 }
        internal sealed override async Task WriteToCoreAsync(
            WriteBuffer writeBuffer, CancellationToken cancellationToken)
        {
            await base.WriteToCoreAsync(writeBuffer, cancellationToken);

            await writeBuffer.ReserveAsync(3, cancellationToken);

            writeBuffer[writeBuffer.Count++] = (byte)this.PacketFlags;
            writeBuffer[writeBuffer.Count++] = this.dtd;
            writeBuffer[writeBuffer.Count++] = (byte)this.applicationBytes.Length;
            await writeBuffer.WriteAsync(
                this.applicationBytes, 0, this.applicationBytes.Length, cancellationToken);
        }