Interface IPeekStream
Namespace: Titanium.Web.Proxy.StreamExtended.Network
Assembly: Titanium.Web.Proxy.dll
Syntax
public interface IPeekStream
Methods
| Edit this page View SourcePeekByteAsync(int, CancellationToken)
Peeks a byte asynchronous.
Declaration
ValueTask<int> PeekByteAsync(int index, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| ValueTask<int> |
PeekByteFromBuffer(int)
Peeks a byte from buffer.
Declaration
byte PeekByteFromBuffer(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index. |
Returns
| Type | Description |
|---|---|
| byte |
Exceptions
| Type | Condition |
|---|---|
| Exception | Index is out of buffer size |
PeekBytesAsync(byte[], int, int, int, CancellationToken)
Peeks bytes asynchronous.
Declaration
ValueTask<int> PeekBytesAsync(byte[] buffer, int offset, int index, int count, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | buffer | The buffer to copy. |
| int | offset | The offset where copying. |
| int | index | The index. |
| int | count | The count. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| ValueTask<int> |