Class TThreadSafeBuffer
Unit
Grijjy.Http
Declaration
type TThreadSafeBuffer = class(TObject)
Description
Thread safe buffer
Hierarchy
- TObject
- TThreadSafeBuffer
Overview
Methods
|
constructor Create(const ACapacity: Integer = BUFFER_SIZE); |
|
destructor Destroy; override; |
|
procedure Write(const ABuffer: Pointer; const ASize: Integer); |
|
function Read(out ABytes: TBytes): Boolean; overload; |
|
function Read(out ABytes: TBytes; const ACount: Integer): Boolean; overload; |
|
function Read(const ABuffer: Pointer; var ALength: NativeInt): Boolean; overload; |
|
function ReadTo(const ASubStr: RawByteString; out ABytes: TBytes): Boolean; |
|
procedure Clear; |
Properties
Description
Methods
|
constructor Create(const ACapacity: Integer = BUFFER_SIZE); |
|
|
destructor Destroy; override; |
|
|
procedure Write(const ABuffer: Pointer; const ASize: Integer); |
Write buffer
|
|
function Read(out ABytes: TBytes): Boolean; overload; |
Read entire buffer
|
|
function Read(out ABytes: TBytes; const ACount: Integer): Boolean; overload; |
Read count number of bytes from the buffer
|
|
function Read(const ABuffer: Pointer; var ALength: NativeInt): Boolean; overload; |
Read up to length number of bytes from the buffer, for nghttp2
|
|
function ReadTo(const ASubStr: RawByteString; out ABytes: TBytes): Boolean; |
Read all bytes up to and including substring match
|
|
procedure Clear; |
Clear the buffer
|
Properties
|
property Size: Integer read GetSize; |
Current actual size of the buffer
|
Generated by P2PasDoc 0.13.0 on 2017-04-25 12:54:26
|