TlsStream.ReadAsync Method
Namespace: Rebex.Net
Assembly: Rebex.Tls.dll (version 7.0.9313)
ReadAsync(Byte[], Int32, Int32, CancellationToken)
Asynchronously reads data from this TlsStream.
Declaration
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Parameters
| Type | Name | Description | 
|---|---|---|
| Byte[] | buffer | An array of bytes to fill with read data.  | 
    
| Int32 | offset | The zero-based byte offset in the buffer at which to copy bytes read from the stream.  | 
    
| Int32 | count | The maximum number of bytes to be read into the buffer.  | 
    
| CancellationToken | cancellationToken | Cancellation token.  | 
    
Returns
| Type | Description | 
|---|---|
| Task<Int32> | A Task<TResult> that represents the asynchronous operation. Result of the Task is the number of bytes read.  |