summaryrefslogtreecommitdiff
path: root/include/com-core_packet.h
blob: 280e5ce456089706248a351cb54d7cb1292e433f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifdef __cplusplus
extern "C" {
#endif

struct method {
	const char *cmd;
	struct packet *(*handler)(pid_t pid, int handle, const struct packet *packet);
};

extern int com_core_packet_async_send(int handle, struct packet *packet, unsigned int timeout, int (*recv_cb)(pid_t, int handle, const struct packet *packet, void *data), void *data);
extern int com_core_packet_send_only(int handle, struct packet *packet);
extern struct packet *com_core_packet_oneshot_send(const char *addr, struct packet *packet);

extern int com_core_packet_client_init(const char *addr, int is_sync, struct method *table);
extern int com_core_packet_client_fini(int handle);
extern int com_core_packet_server_init(const char *addr, struct method *table);
extern int com_core_packet_server_fini(int handle);

#ifdef __cplusplus
}
#endif

/* End of a file */