Class TThreadSafeBuffer

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TThreadSafeBuffer = class(TObject)

Description

Thread safe buffer

Hierarchy

  • TObject
  • TThreadSafeBuffer

Overview

Methods

Public constructor Create(const ACapacity: Integer = BUFFER_SIZE);
Public destructor Destroy; override;
Public procedure Write(const ABuffer: Pointer; const ASize: Integer);
Public function Read(out ABytes: TBytes): Boolean; overload;
Public function Read(out ABytes: TBytes; const ACount: Integer): Boolean; overload;
Public function Read(const ABuffer: Pointer; var ALength: NativeInt): Boolean; overload;
Public function ReadTo(const ASubStr: RawByteString; out ABytes: TBytes): Boolean;
Public procedure Clear;

Properties

Public property Size: Integer read GetSize;

Description

Methods

Public constructor Create(const ACapacity: Integer = BUFFER_SIZE);
 
Public destructor Destroy; override;
 
Public procedure Write(const ABuffer: Pointer; const ASize: Integer);

Write buffer

Public function Read(out ABytes: TBytes): Boolean; overload;

Read entire buffer

Public function Read(out ABytes: TBytes; const ACount: Integer): Boolean; overload;

Read count number of bytes from the buffer

Public function Read(const ABuffer: Pointer; var ALength: NativeInt): Boolean; overload;

Read up to length number of bytes from the buffer, for nghttp2

Public function ReadTo(const ASubStr: RawByteString; out ABytes: TBytes): Boolean;

Read all bytes up to and including substring match

Public procedure Clear;

Clear the buffer

Properties

Public property Size: Integer read GetSize;

Current actual size of the buffer


Generated by P2PasDoc 0.13.0 on 2017-04-25 12:54:26