lichao
2021-04-15 c64c54d8e75b9354dc49a7b6b2d326e7dd59eb37
src/bh_api.h
@@ -14,6 +14,18 @@
                int *reply_len,
                const int timeout_ms);
bool BHRegisterTopics(const void *topics,
                      const int topics_len,
                      void **reply,
                      int *reply_len,
                      const int timeout_ms);
bool BHSubscribeTopics(const void *topics,
                       const int topics_len,
                       void **reply,
                       int *reply_len,
                       const int timeout_ms);
typedef void (*FSubDataCallback)(const void *proc_id,
                                 const int proc_id_len,
                                 const void *data,
@@ -25,7 +37,14 @@
                                const int data_len,
                                BHServerCallbackTag *tag);
void BHStartWorker(FServerCallback server_cb, FSubDataCallback sub_cb);
typedef void (*FClientCallback)(const void *proc_id,
                                const int proc_id_len,
                                const void *msg_id,
                                const int msg_id_len,
                                const void *data,
                                const int data_len);
void BHStartWorker(FServerCallback server_cb, FSubDataCallback sub_cb, FClientCallback client_cb);
bool BHServerCallbackReply(const BHServerCallbackTag *tag,
                           const void *data,
                           const int data_len);
@@ -47,6 +66,11 @@
               int *msgpub_len,
               const int timeout_ms);
bool BHAsyncRequest(const void *request,
                    const int request_len,
                    void **msg_id,
                    int *msg_id_len);
bool BHRequest(const void *request,
               const int request_len,
               void **proc_id,