zhangzengfei
2023-01-11 c4d21b97b8a9eedd485efd026395a1007342c3da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#ifndef _bus_nng_api_h_
#define _bus_nng_api_h_
 
#ifdef __cplusplus
extern "C"{
#endif
 
void* bus_register(const void *proc_info,
               const int proc_info_len,
               void **reply,
               int *reply_len,
               const int timeout_ms);
 
int bus_unregister(void* handle, const void *proc_info,
                 const int proc_info_len,
                 void **reply,
                 int *reply_len,
                 const int timeout_ms);
 
int bus_register_topics(void* handle, const void *topics,
                     const int topics_len,
                     void **reply,
                     int *reply_len,
                     const int timeout_ms);
 
int bus_query_topic_address(void* handle, const void *remote,
                        const int remote_len,
                        const void *topics,
                        const int topics_len,
                        void **reply,
                        int *reply_len,
                        const int timeout_ms);
 
int bus_query_procs(void* handle, const void *remote,
                 const int remote_len,
                 const void *query,
                 const int query_len,
                 void **reply,
                 int *reply_len,
                 const int timeout_ms);
 
int bus_subscribe_topics(void* handle, const void *topics,
                      const int topics_len,
                      void **reply,
                      int *reply_len,
                      const int timeout_ms);
int bus_subscribe_topics_net(void* handle, const void *topics,
                         const int topics_len,
                         void **reply,
                         int *reply_len,
                         const int timeout_ms);
 
int bus_heartbeat_easy(void* handle, const int timeout_ms);
int bus_heartbeat(void* handle, const void *proc_info,
                const int proc_info_len,
                void **reply,
                int *reply_len,
                const int timeout_ms);
 
int bus_publish(void* handle, const void *msgpub,
              const int msgpub_len,
              const int timeout_ms);
 
int bus_recv_pubmsg(void* handle, void **proc_id,
              int *proc_id_len,
              void **msgpub,
              int *msgpub_len,
              const int timeout_ms);
 
 
int bus_request(void* handle, const void *remote,
              const int remote_len,
              const void *request,
              const int request_len,
              void **proc_id,
              int *proc_id_len,
              void **reply,
              int *reply_len,
              const int timeout_ms);
 
int bus_recv_request(void* handle, void **proc_id,
                  int *proc_id_len,
                  void **request,
                  int *request_len,
                  void **src,
                  const int timeout_ms);
 
int bus_send_reply(void* handle, void *src,
                const void *reply,
                const int reply_len);
 
void bus_cleanup(void* handle);
 
void bus_free(void *buf, int size);
 
int bus_last_error(void **msg, int *msg_len);
 
#ifdef __cplusplus
}
#endif
 
#endif