Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::nodejs::msgpack_client::MsgpackClientWrapper Class Reference

NAPI wrapper for msgpack calls via shared memory IPC. More...

#include <msgpack_client_wrapper.hpp>

Inheritance diagram for bb::nodejs::msgpack_client::MsgpackClientWrapper:

Public Member Functions

 MsgpackClientWrapper (const Napi::CallbackInfo &info)
 
 ~MsgpackClientWrapper ()
 
Napi::Value call (const Napi::CallbackInfo &info)
 Send a msgpack buffer and receive response.
 
Napi::Value close (const Napi::CallbackInfo &info)
 Close the shared memory connection.
 

Static Public Member Functions

static Napi::Function get_class (Napi::Env env)
 

Private Attributes

std::unique_ptr< bb::ipc::IpcClientclient_
 
bool connected_ = false
 

Detailed Description

NAPI wrapper for msgpack calls via shared memory IPC.

Provides a simple synchronous interface to send msgpack buffers to the bb binary via shared memory and receive responses.

Definition at line 15 of file msgpack_client_wrapper.hpp.

Constructor & Destructor Documentation

◆ MsgpackClientWrapper()

MsgpackClientWrapper::MsgpackClientWrapper ( const Napi::CallbackInfo &  info)

Definition at line 9 of file msgpack_client_wrapper.cpp.

◆ ~MsgpackClientWrapper()

MsgpackClientWrapper::~MsgpackClientWrapper ( )

Definition at line 31 of file msgpack_client_wrapper.cpp.

Member Function Documentation

◆ call()

Napi::Value MsgpackClientWrapper::call ( const Napi::CallbackInfo &  info)

Send a msgpack buffer and receive response.

Parameters
info[0]- Buffer containing msgpack data
Returns
Buffer containing msgpack response

Definition at line 38 of file msgpack_client_wrapper.cpp.

◆ close()

Napi::Value MsgpackClientWrapper::close ( const Napi::CallbackInfo &  info)

Close the shared memory connection.

Definition at line 79 of file msgpack_client_wrapper.cpp.

◆ get_class()

Napi::Function MsgpackClientWrapper::get_class ( Napi::Env  env)
static

Definition at line 91 of file msgpack_client_wrapper.cpp.

Member Data Documentation

◆ client_

std::unique_ptr<bb::ipc::IpcClient> bb::nodejs::msgpack_client::MsgpackClientWrapper::client_
private

Definition at line 35 of file msgpack_client_wrapper.hpp.

◆ connected_

bool bb::nodejs::msgpack_client::MsgpackClientWrapper::connected_ = false
private

Definition at line 36 of file msgpack_client_wrapper.hpp.


The documentation for this class was generated from the following files: