12#define RPC_BUFFER_SIZE (1024)
14#define RECORD_RPC "rpc"
22typedef void (*RpcSendBytesCallback)(
void* context, uint8_t* bytes,
size_t bytes_len);
24typedef void (*RpcBufferIsEmptyCallback)(
void* context);
28typedef void (*RpcSessionClosedCallback)(
void* context);
31typedef void (*RpcSessionTerminatedCallback)(
void* context);
47RpcOwner rpc_session_get_owner(
RpcSession* session);
83void rpc_session_set_context(
RpcSession* session,
void* context);
91void rpc_session_set_send_bytes_callback(
RpcSession* session, RpcSendBytesCallback callback);
99void rpc_session_set_buffer_is_empty_callback(
101 RpcBufferIsEmptyCallback callback);
109void rpc_session_set_close_callback(
RpcSession* session, RpcSessionClosedCallback callback);
116void rpc_session_set_terminated_callback(
118 RpcSessionTerminatedCallback callback);
129size_t rpc_session_feed(
RpcSession* session,
const uint8_t* buffer,
size_t size, uint32_t timeout);
137size_t rpc_session_get_available_size(
RpcSession* session);