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
| #ifndef __MOD_SOCKET_H__
| #define __MOD_SOCKET_H__
|
|
| #ifdef __cplusplus
| extern "C" {
| #endif
|
| enum socket_mod_t
| {
| PULL_PUSH = 1,
| REQ_REP = 2,
| PAIR = 3,
| PUB_SUB = 4,
| SURVEY = 5,
| BUS = 6
|
| };
|
|
| void *mod_open_socket(int mod);
|
| int mod_close_socket(void * _socket);
|
| int mod_socket_bind(void * _socket, int port);
|
|
| int mod_listen(void * _socket);
|
|
| int mod_connect(void * _socket, int port);
|
| int mod_send(void * _socket, const void *buf, const int size);
|
| int mod_recv(void * _socket, void **buf, int *size) ;
|
| void mod_free(void *buf);
|
| #ifdef __cplusplus
| }
| #endif
|
| #endif
|
|