zhangmeng
2022-12-12 ecf23f882ca1b8aaf0863980fc4781c515da1695
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
#ifndef _c_bus_client_h_
#define _c_bus_client_h_
 
#include <stddef.h>
#include <stdint.h>
 
#include "message.h"
 
#ifdef __cplusplus
extern "C"{
#endif
 
void* bus_client_init(const char* srvid, const size_t sidsize, const creg* rinfo);
void bus_client_free(void* handle);
 
struct csubmsg* bus_client_get_submsg(void* handle);
 
struct creqmsg* bus_client_get_reqmsg(void* handle, void** src);
int bus_client_request(void* handle, struct creqmsg* msg, struct crepmsg** repmsg);
int bus_client_reply_msg(void* handle, void* src, const struct crepmsg* msg);
 
// test
int bus_client_pubmsg(void* handle, void* data, const size_t size);
 
#ifdef __cplusplus
}
#endif
#endif