-
Notifications
You must be signed in to change notification settings - Fork 8
/
struct.h
63 lines (53 loc) · 821 Bytes
/
struct.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef _STRUCT_H
#define _STRUCT_H
typedef char byte;
enum connect_status {
CONNECT = 1,
READ_HTTP,
RESOLVE_HTTP,
HANDLE,
RESPONSE,
FINISH
};
enum read_http_status {
READ_HTTP_START = 0,
METHORD = 1 << 1,
URL = 1 << 2,
PROTO = 1 << 3,
VERSION = 1 << 4,
REQUEST_HEAD = 1 << 5,
CONTENT = 1 << 6,
READ_HTTP_FINISH = 1 << 7,
READ_HTTP_ERROR = 1 << 8
};
enum http_status {
INITIAL = 1,
HTTP_FINISH
};
enum http_method {
GET = 1,
POST
};
enum http_proto {
HTTP = 1,
HTTPS
};
/*
struct user_info {
};
*/
typedef void *(*function)(void *);
struct test_msg {
char name[8];
char passwd[8];
long begin_time, end_time;
};
/*
typedef struct sedaObject {
unsigned type:4;
unsigned encoding:4;
int refcount;
void *ptr;
} sobj;
*/
#endif ///