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