NativeMessageBytes class final
Creates byte views that remain valid after a routing handle is released.
New runtimes export independent native owners, attached to the external typed-data allocation so all subviews retain storage. Older runtimes use an owned Dart copy, never an unowned view. No explicit disposal is required.
Constructors
- NativeMessageBytes(DynamicLibrary library)
-
Resolves the optional, paired ownership entry points in
library.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- messageHandleAbi → NativeMessageHandleAbi
-
The same complete ABI used by the client and router message bindings.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- supportsZeroCopy → bool
-
Whether this runtime can retain message bytes without a payload copy.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
int handle, NativeMessageBytePart part, {required Pointer< Uint8> borrowed, required int length}) → Uint8List -
Exports
partwhile the caller still ownshandle. -
toString(
) → String -
A string representation of this object.
inherited
-
withCopiedBytes<
T> (int handle, NativeMessageBytePart part, {required Pointer< Uint8> borrowed, required int length, required T consume(Uint8List copy)}) → T -
Copies
partand consumes the owned copy under a temporary native owner.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited