NativeBuffer class final
Native memory shared with the transport.
A buffer allocated here can be filled in Dart and handed to
SendStream.writeBuffer (no Dart-side copy), or passed to
RecvStream.readInto so the transport writes straight into it.
Constructors
- NativeBuffer(int capacity)
-
Allocates
capacitybytes of native memory. -
NativeBuffer.adopt(Pointer<
wt_buffer_t> _handle) -
Adopts an existing
wt_buffer_thandle (takes ownership).
Properties
- bytes → Uint8List
-
A view over the first length bytes (no copy).
no setter
- capacity → int
-
Allocated capacity in bytes.
no setter
-
data
→ Pointer<
Uint8> -
Writable start of the allocation.
no setter
-
handle
→ Pointer<
wt_buffer_t> -
The underlying handle.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- length ↔ int
-
Logical length in bytes.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
free(
) → void -
Releases the storage. Any in-flight read into it must have completed, and
any list returned by
adoptBufferfrom this buffer must be dropped first. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reserve(
int capacity) → void - Grows the buffer, invalidating previously obtained pointers.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited