Lawo.EmberPlusSharp.S101.FramingStream.CreateAsync C# (CSharp) Méthode

CreateAsync() static private méthode

static private CreateAsync ( WriteBuffer writeBuffer, CancellationToken cancellationToken ) : Task
writeBuffer WriteBuffer
cancellationToken System.Threading.CancellationToken
Résultat Task
        internal static async Task<FramingStream> CreateAsync(
            WriteBuffer writeBuffer, CancellationToken cancellationToken)
        {
            await writeBuffer.ReserveAsync(1, cancellationToken);
            return new FramingStream(writeBuffer);
        }

Usage Example

Exemple #1
0
        private async Task CreateFramingStream(PacketFlags packetFlags, CancellationToken cancellationToken)
        {
            this.framingStream = await FramingStream.CreateAsync(this.rawBuffer, cancellationToken);

            this.message.PacketFlags = packetFlags;
            await this.message.WriteToAsync(this.unframedBuffer, cancellationToken);
        }
All Usage Examples Of Lawo.EmberPlusSharp.S101.FramingStream::CreateAsync