wangzhengquan
2021-02-02 cb85aa8a8d02a3d6dc16e3f32e78da9e70f9c7f5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef _SOCKET_DEF_H_
#define _SOCKET_DEF_H_
 
 
#define GET(p)       (*(uint32_t *)(p))
#define PUT(p, val)  (*(uint32_t *)(p) = (val))
 
#define GET_INT32(p)       (*(int32_t *)(p))
#define PUT_INT32(p, val)  (*(int32_t *)(p) = (val))
 
 
enum socket_mod_t
{
    PULL_PUSH = 1,
    REQ_REP = 2,
    PAIR = 3,
    PUB_SUB = 4,
    SURVEY = 5,
    BUS = 6
    
};
 
#endif