API
InteractorPayloadsโ
Declaration
class InteractorPayloads {
void register<T extends Struct>(int size)
int size<T extends Struct>()
Pointer<T> allocate<T extends Struct>()
void free<T extends Struct>(Pointer<T> payload)
void destroy()
}
registerโ
Create a new native pool for the Struct
.
Allocation specific operations for the Struct
:โ
- size
- allocate
- free
destroyโ
Destroy all created pools.
InteractorDatasโ
Declaration
class InteractorDatas {
Pointer<Void> allocate(int size)
void free(Pointer<Void> pointer, int size)
}
allocateโ
Similar to 'malloc' but uses smalloc.
freeโ
Similar to 'free' but uses smalloc.
InteractorBuffersโ
Declaration
class InteractorBuffers {
void release(int bufferId)
Uint8List read(int bufferId)
void setLength(int bufferId, int length)
void write(int bufferId, Uint8List bytes)
int? get()
Future<int> allocate() async
Future<List<int>> allocateArray(int count) async
int available()
int used()
void releaseArray(List<int> buffers);
}
releaseโ
Return buffer to the pool.
readโ
Read buffer data.
setLengthโ
Set buffer data size.
writeโ
Write data to buffer
getโ
Get the next buffer if available.
allocateโ
Get the next buffer if available or await it.
allocateArrayโ
Get the next buffers if available or await it.
availableโ
How many buffers are available for now
usedโ
How many buffers are used for now
releaseArrayโ
Return buffers to the pool