Class StreamExtensions
Inheritance
System.Object
StreamExtensions
Namespace: DSharpPlus.VoiceNext
Assembly: cs.temp.dll.dll
Syntax
public static class StreamExtensions
Methods
CopyToAsync(Stream, VoiceTransmitSink, Nullable<Int32>, CancellationToken)
Asynchronously reads the bytes from the current stream and writes them to the specified VoiceTransmitSink.
Declaration
public static Task CopyToAsync(this Stream source, VoiceTransmitSink destination, int? bufferSize = default(int? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
Stream | source | The source |
VoiceTransmitSink | destination | The target VoiceTransmitSink |
System.Nullable<System.Int32> | bufferSize | The size, in bytes, of the buffer. This value must be greater than zero. If null, defaults to the packet size specified by |
System.Threading.CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |