Search Results for

    Show / Hide Table of Contents

    Class DefaultBufferPool

    A concrete IBufferPool implementation backed by the shared ArrayPool<T>. It is thread-safe and handles both fixed and variable size buffer requests. Note: rented buffers may be larger than the requested size (ArrayPool bucketing) and are not cleared on return, so callers must not assume the buffer length equals the requested size.

    Inheritance
    object
    DefaultBufferPool
    Implements
    IBufferPool
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: StreamExtended.BufferPool
    Assembly: StreamExtended.dll
    Syntax
    public sealed class DefaultBufferPool : IBufferPool, IDisposable

    Properties

    | Edit this page View Source

    BufferSize

    Buffer size in bytes used throughout this proxy. Default value is 8192 bytes.

    Declaration
    public int BufferSize { get; set; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()
    | Edit this page View Source

    GetBuffer()

    Gets a buffer with a default size.

    Declaration
    public byte[] GetBuffer()
    Returns
    Type Description
    byte[]
    | Edit this page View Source

    GetBuffer(int)

    Gets a buffer.

    Declaration
    public byte[] GetBuffer(int bufferSize)
    Parameters
    Type Name Description
    int bufferSize

    Size of the buffer.

    Returns
    Type Description
    byte[]
    | Edit this page View Source

    ReturnBuffer(byte[])

    Returns the buffer.

    Declaration
    public void ReturnBuffer(byte[] buffer)
    Parameters
    Type Name Description
    byte[] buffer

    The buffer.

    Implements

    IBufferPool
    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX