-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathuws.h
57 lines (47 loc) · 987 Bytes
/
uws.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
#ifndef __UWS_H__
#define __UWS_H__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
#include <syslog.h>
#include <ctype.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#define UWS_SERVER "uws/0.0.10"
#define LINE_LEN 1024
#define OPT_LEN 50
#define VLU_LEN 50
#define PATH_LEN 512
#define bool int
#define true 1
#define false 0
#define INIT_ARR_LEN 8
#define RETURN_AGAIN -1
#define RETURN_SUCCESS 0
#define RETURN_ERROR 1
void exit_err(const char* str);
typedef struct nv_pair {
char* name;
char* value;
}Http_Param, Param_Value;
typedef struct {
size_t len;
size_t total;
unsigned char *mem;
} memory_t;
typedef struct {
char **array;
int total;
int len;
} str_array_t;
struct response {
struct http_header *header;
size_t header_len;
char *content;
size_t content_len;
};
char* find_value(char* key);
#endif