47 Napi::Value
call(
const Napi::CallbackInfo&
info);
53 Napi::Value
acquire(
const Napi::CallbackInfo&
info);
59 Napi::Value
release(
const Napi::CallbackInfo&
info);
61 static Napi::Function
get_class(Napi::Env env);
74 std::unique_ptr<bb::ipc::IpcClient>
client_;
Asynchronous NAPI wrapper for msgpack calls via shared memory IPC.
static Napi::Function get_class(Napi::Env env)
void poll_responses()
Background thread function that polls for responses.
Napi::Value call(const Napi::CallbackInfo &info)
Send a msgpack buffer asynchronously.
Napi::Value release(const Napi::CallbackInfo &info)
Release a reference to allow the event loop to exit Called by TypeScript when there are no pending ca...
Napi::Value setResponseCallback(const Napi::CallbackInfo &info)
Set the JavaScript callback to be invoked when responses arrive.
Napi::FunctionReference js_callback_
std::unique_ptr< bb::ipc::IpcClient > client_
Napi::Value acquire(const Napi::CallbackInfo &info)
Acquire a reference to keep the event loop alive Called by TypeScript when there are pending callback...
Napi::ThreadSafeFunction tsfn_