kind of working!

This commit is contained in:
Henry Hiles 2026-01-24 16:39:56 +00:00
commit 8be9a4f2f6
No known key found for this signature in database
3 changed files with 31 additions and 24 deletions

View file

@ -37,21 +37,25 @@ class ClientController extends Notifier<int> {
GomuksStart(
handle,
Pointer.fromFunction<
Void Function(Pointer<Char>, Int64, GomuksBorrowedBuffer)
>(gomuksCallback),
NativeCallable<
Void Function(Pointer<Char>, Int64, GomuksBorrowedBuffer)
>.listener(gomuksCallback)
.nativeFunction,
);
return handle;
}
Map<String, dynamic> sendCommand(String command, Map<String, dynamic> data) {
final bufferPointer = data.toGomuksBufferPtr();
final response = GomuksSubmitCommand(
state,
command.toNativeUtf8().cast<Char>(),
data.toGomuksBuffer(),
bufferPointer.ref,
);
calloc.free(bufferPointer);
return response.buf.toJson();
}