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
| #include <stdio.h>
| #include <stdlib.h>
| #include <string.h>
| #include <time.h>
| #include <unistd.h>
|
| #include <nng/nng.h>
|
|
| enum bipc_mod_t
| {
| PULL_PUSH = 1,
| REQ_REP = 2,
| PAIR = 3,
| PUB_SUB = 4,
| SURVEY = 5,
| BUS = 6
|
| };
|
| enum bipc_err {
| BIPC_ETIMEDOUT = 5
| };
|
|
| typedef nng_socket bipc_socket_t;
|
| int bipc_listen(bipc_socket_t *sock, const char *url, bipc_mod_t mod);
|
| int bipc_connect(bipc_socket_t *sock, const char *url, bipc_mod_t mod);
|
| int bipc_send(bipc_socket_t *sock, const void *data, size_t size);
|
| int bipc_recv(nng_socket *sock, void *data, size_t *sizep);
|
| void bipc_free(void *ptr, size_t size) ;
|
| const char * bipc_strerror(int error);
|
|